[SOLVED] Secondary (slave) DNS server

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
bernikm
Posts: 7
Joined: 2014/02/24 08:36:25

[SOLVED] Secondary (slave) DNS server

Post by bernikm » 2014/02/24 08:43:37

Hi

We need to install a secondary DNS server, that will automaticaly replicate zones from our primary DNS that is running on Microsoft OS.
So the idea is, that all zones and records that are configured and entered into our primary DNS (Microsoft) will automaticaly replicate to secondary DNS that will run on CentOS.
I assume that this secondary DNS will be refered as a secondary or 'slave' DNS.

Now we have a 'secondary' DNS running on debian, but every time something is changed on our zones we need to manually add all records and zones on both server (primary MS and secondary debian). On a new CentOS DNS server we wish to acomplish that all changes made to primary DNS will automatically be transfered to secondary DNS.
How can this be done on CentOS ?

Thank you in advance

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Secondary (slave) DNS server

Post by avij » 2014/02/24 09:56:10

You need to allow zone transfers for the slave DNS server's IP address, possibly configure the master to send notifies to slave servers (if this is not enabled by default) whenever there are zone changes, and have something like this in your slave DNS server's named.conf:

Code: Select all

zone "example.com" {
        type slave;
        file "slaves/example.com";
        allow-query { 0/0; ::0/0; };
        allow-transfer { !0/0; !::0/0; };
        masters { 192.0.2.42; 2001:db8::1; };
};
Whenever you make changes to the zones on your master DNS server, update the zone's serial number in the SOA record as well. The serial number is usually of the form yyyymmddnn, where nn is a sequence number, usually starting from 1 for each day. When the master server reloads the zone, it will send the serial number to the slave servers. If the slave servers notice that the serial number has changed, the slaves will initiate a zone transfer from the master.

bernikm
Posts: 7
Joined: 2014/02/24 08:36:25

Re: Secondary (slave) DNS server

Post by bernikm » 2014/02/25 09:25:18

Thanks. I got it up and running :-)

Post Reply