backup dns server

I want to set up a backup dns server for my domain using bind918. I set up the main one so long ago that I forget most of the details! Is there a quick hack where I can minimally edit named.conf from the main dns server and run it on the backup machine? I don't strictly have to do this but it would be nice to have this in case the main dns server machine OS update fails for some reason. Thanks!
 
I wrote bind config files for that once, but no longer have access. Sorry. When you get it running, please consider...

My recollection is that failure in your primary DNS server slows things down a lot because of the timeouts that happen when it does not respond, and before secondary servers are queried.

Yes, you eventually get a response from a secondary server, if you have one, but the timeouts slow things down so badly that the application response times get completely unacceptable.

I know that I chose to implement a caching server (in the form of dnsmasq(8)) on each and every DNS client to ensure continuity of acceptable service when the primary DNS server for our internal domain was down.
 
On master dns you need to allow zone transfer for the domain.
On slave dns you can use a fresh installed bind and add slave zone definition.
See examples.

Master dns zone config example:
Code:
zone "domain.name" {
        type master;
        file "/usr/local/etc/namedb/master/zonefile";
        allow-transfer { SLAVE DNS IP;};
};

Slave dns zone config example:
Code:
zone "domain.name" {
        type slave;
        file "/usr/local/etc/namedb/slave/zonefile";
        masters { MASTER DNS IP;};
        masterfile-format text;
        allow-transfer { none; };
};

Restart both dns servers or run rndc reload on the both servers.
Slave must download zone from master to the path specified in slave zone configuration.
Check that both servers are up and running from any other external host.
Run nslookup domain.name master_ip and nslookup domain.name slave_ip
Check the answer from the both servers.
You can use a host command instead of nslookup to check availability of the dns-zone on each dns-server.
Change your zonefile on master - add second NS record.
Update NS SERVERS records for your domain using control panel of the company where you registered your domain.
 
Back
Top