Simpliest slave DNS solution - tested.

pug123

Verified User
Joined
Feb 5, 2006
Messages
54
Location
Poland
Hello!

I had to run fast secondary DNS on VPS and I couldn't find time to dig this forum and find solutions so I wrote one line crontab and it's works :)

THis is the most simple solution for slave DNS without directadmin.
It works sending dns zones to secondary nameserver every 5minutes.

Here are the steps.I've made them work on Debian Etch but it should work similar in other distributions as well but probably you would have to change some paths.

1) On secondary server(or vps) instal bind9 and all bind tools.
2) On primary server with directadmin type crontab -e and insert

Code:
*/5 * * * *  scp /etc/bind/*.db [email protected]:/etc/bind/; scp /etc/bind/named.conf [email protected]:/etc/bind/;ssh [email protected] "/etc/init.d/bind9 reload"
(10.10.10.10 is secondary server's IP. Replace it with your secondary server's IP)

Yes, that is all :) Now master server will be sending dns zones to secondary DNS server and reloading it every time after load new zones.

I know that this is not best solution.It is probably the most poor solution however for sure it is very fast one to setup:)

Enjoy,
Mart
 
Last edited:
As you suggest, it's not the best solution? Why? Several reasons:

1) It requires a dedicated DNS slave nameserver; the slave nameserver cannot slave more than one nameserver nor can it handle any authoritative (primary) DNS.

2) It presumes that both servers can use the same named.conf file; it doesn't allow for any settings specific to the slave nameserver's network or server.

A perhaps better solution (and also fast to set up) if you're not setting up a dedicated slave DNS server for only one master server, and/or also need to also use your Slave DNS server for other purposes, is the Master2Slave DNS Replicator discussed in these forums. I paid to have it written and I've published it as an open source solution.

Jeff
 
Back
Top