Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple *Authoritative DNS Server* in Java

Tags:

java

dns

Is there an already written Java DNS Server that only implements authoritative responses. I would like to take the source code and move it into a DNS server we will be developing that will use custom rule sets to decide what TTL to use and what IP address to publish.

The server will not be a caching server. It will only return authoritative results and only be published on the WHOIS record for the domains. It will never be called directly.

The server will have to publish MX records, A records and SPF/TXT records. The plan is to use DNS to assist in load balancing among gateway-servers on multiple locations (we are aware that DNS has a short reach in this area). Also it will cease to publish IP addesses of gateway-servers when they go down (on purpose or on accident) (granted, DNS will only be able to help during extended outages).

We will write the logic for all this ourselves.. but I would very much like to start with a DNS server that has been through a little testing instead of starting from scratch.

However, that is only feasible if what we copy from is simple enough. Otherwise,, it could turn out to be a waste of time

like image 859
700 Software Avatar asked Feb 11 '11 20:02

700 Software


People also ask

What is the authoritative DNS server?

Authoritative DNS nameservers are responsible for providing answers to recursive DNS nameservers about where specific websites can be found. These answers contain important information for each domain, like IP addresses.

How do I make my DNS server authoritative?

To use a DNS Server Group with Primary zones, only Secondary DNS servers should be configured. To create an authoritative DNS server group, complete the following: From the Cloud Services Portal, click Manage -> DNS -> DNS Server Groups -> Create -> Authoritative DNS Server Group.

Where are authoritative DNS servers?

Authoritative DNS information (DNS records) from its own store. It could come from a master zone file, from a secondary zone duplicate transferred from a master server, from Dynamic DNS, etc. In case it doesn't know the answer, it is going to direct to another nameserver.

Is 8.8 8.8 a recursive DNS server?

8.8. 8.8 is a free Domain Name System (DNS) service offered to Internet users worldwide by Google which functions as a recursive name server. Google Public DNS operates recursive Recursive name servers for public use at the IP Address 8.8. 8.8 and 8.8.


2 Answers

George,

I guess what you need is a java library which implements DNS protocol. Take a look at dnsjava

This is very good in terms of complete spec coverage of all types of records and class.

But the issue which you might face with a java based library is performance. DNS servers would be expected to have a high throughput. But yes, you can solve that by throwing more hardware.

If performance is a concern for you , I would suggest to look into unbound

like image 77
rajeshnair Avatar answered Oct 02 '22 22:10

rajeshnair


http://www.xbill.org/dnsjava/

Unfortunately, the documentation states "jnamed should not be used for production, and should probably not be used for testing. If the above documentation is not enough, please do not ask for more, because it really should not be used."

I'm not aware of any better alternatives, however.

like image 42
Robert Tupelo-Schneck Avatar answered Oct 02 '22 23:10

Robert Tupelo-Schneck