Dns Servers

Hi,

Whats the best way to setup a pair of dns servers (1 Primary & 1 Secondary). I will require the secondary dns server to handle requests only if the primary dns server is overloaded or down.

Do I just set them both up the same, with identical named records, but set resolv.conf on the secondary server to have the primary dns server listed first, and then have itself listed second?

Cheers
choccarlmAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
jlevieConnect With a Mentor Commented:
The preferred solution is to make one DNS server the master and to make the other one of its secondaries. For each zone on the master that you need to replicate onto the secondary (all zones you are authoritative for, excluding the hints and localhost zones) you'll need to include a rule like:

     allow-transfer { 1.1.1.2; ];

where 1.2.3.4 is the IP of the secondary. On the secondary you'll have the same zones defined in named.conf. Each of your authoritative zone, excluding hints and localhost zones, will be of marked as slave instead of as master and you'll specify the master's IP, somethinge like:

     type slave;
     masters { 1.1.1.1; };
     allow-transfer { 1.1.1.1; };

Oh yes, you also need to list both servers as nameservers in each of the zone files.

A sample of what part of the master's named.conf file might look like is:

zone "." {
zone "." {
        type hint;
        file "root.zone";
};

zone "localhost" {
        type master;
        file "local.zone";
};

zone "0.0.127.in-addr.arpa" {
        type master;
        file "local.rev";
};

zone "entrophy-free.net" {
        type master;
        allow-transfer { 10.1.0.2; };
        file "my-dom.tld.zone";
};


And on the secondary that same part would look like:

        type hint;
        file "root.zone";
};

zone "localhost" {
        type master;
        file "local.zone";
};

zone "0.0.127.in-addr.arpa" {
        type master;
        file "local.rev";
};

zone "entrophy-free.net" {
        type slave;
        allow-transfer { 10.1.0.1; };
        masters { 10.1.0.1; };
        file "my-dom.tld.zone";
};

And in each of the zone files you'd have:

       IN NS  name-of-master.my-dom.tld.
       IN NS  name-of-secondary.my-dom.tld.
0
 
choccarlmAuthor Commented:
The trouble is, is that I have several hundred domains, so it will be quite hard to manage 2 servers with different type's of zones (Master & slave). Is there a way to get the master dns server to copy the zones and named.conf in the correct format across to the slave server?

Is there a perl script of some sort that will do the job?

Cheers
0
 
jlevieCommented:
I don't know of a ready made tool for managing the secondaries named.conf, but then I've never loooked very hard for one. It wouldn't be very difficult to craft such a script since the config for the secondary is derived from the config for the master. You'd need to make sure that all zones defined on the master were in a standard format, of course.

If you want to send me a copy of your named.conf (to jim@entrophy-free.net) I'll take a crack at writing a perl script that would generate the secondary named.conf.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
samriCommented:
choccarlm,

Not sure what your OS is, but if you happens to be running some kind of Unix variance, drop by http://www.webmin.com/ It has a nice Web based interface for sysadmin stuff, and yes, bind modules are also available..
0
 
EdUSCCommented:
Hi,

Don't put the allow-transfer {}; statement on the slave.  That should go on the master and have the slave server as the arguement.  Another tip is to have only your slaves performing your query resolution.  That way your master is safe behind a firewall and only allowed to send zone transfers to your slaves.

One redundant way to do it, is to have a master and two slaves.  The master is on your private net with the two slaves out on your DMZ.  Use a firewall to lock down the traffic to and from your master to allow only transfers to the slaves. Make the slaves non-recursive and do not allow transfers on the zone records.

EW
0
 
j2Commented:
EdUSC

Of cource you should have allow transfer on the slave, if for no other reason then to prevent people from doing zone-stealing.
0
 
EdUSCCommented:
True.  I realized that after I sent the comment that there should be an allow-transfer {none;} in the slaves as well.

Oops.  That's what I get for speaking w/o notes... :o)
0
 
CleanupPingCommented:
choccarlm:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
samriCommented:
i'll go for the 1st comment by jim.
0
 
ahoffmannCommented:
CC
0
 
samriCommented:
ahoffmann: CC ?...  Another Spanish word ?
0
 
ahoffmannCommented:
> CC ?...  Another Spanish word ?
LOL

s/CC/Cc:/ && s/Cc:/carbon copy/ && s/carbon copy/I'll second that/
not very spanish, isn't it?
;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.