DNS not replicating from master to slave

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
codenjanod
Posts: 7
Joined: 2010/01/27 10:53:12
Contact:

Re: DNS not replicating from master to slave

Post by codenjanod » 2010/03/04 08:21:25

Thanks for that ... took a bit to tweak the script to change the master entries in the "named.conf" file to slave for the slave servers, but so far it is working fine.

It will be great if all this can happen on the fly and we never have to really touch any of the slave server's configuration(named.conf) files.

So if you telling me that your named.conf file replicates to the slave server 100%, as well as any changed or new zone files, that is great.

Then I would like to have a look at your config files if you do not mind, minus your private info of course.

The only reason for the script is that I now have 3 slave servers, soon to be 4, and I do not want to edit all 3 slave server's "named.conf" files with any changed or new entries, so the script makes it easier.

And after the notifies the zone files are copied without any hassles.


Thanks again

amonamarth
Posts: 40
Joined: 2010/01/06 07:06:29
Location: Los Angeles

Re: DNS not replicating from master to slave

Post by amonamarth » 2010/03/06 01:46:08

ok, no problem

Please note: Everything between * is private information replaced by bogus stuff

here is my /etc/named.conf on master's

[code]
options {
listen-on port 53 {
127.0.0.1;
*master's public IP*;
192.168.2.1;
};

listen-on-v6 port 53 { ::1; };

directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";

allow-query { any; };

allow-query-cache { any; };

allow-recursion {
192.168.2.0/24;
127.0.0.1;
};

allow-transfer {
*IP of slave #1*;
*IP of slave #2*;
};
notify yes;
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

include "/etc/named.rfc1912.zones";

// Primary Zone for *my domain*
zone "*my_domain.com*" {
type master;
file "external.db";
};

zone "*my_reverse_subnet*.in-addr.arpa" {
type master;
file "external.rr.db";
};
[/code]
... and here is my /etc/named.conf on slaves

[code]
options {
directory "/var/named";
forwarders {
*forwarder DNS #1*;
*forwarder DNS #1*;
};
allow-transfer {
none;
};

query-source address * port 53;

listen-on port 53 {
*slave's public IP*;
192.168.2.3;
127.0.0.1;
};
};
logging {
channel update_debug {
file "/var/log/update-debug.log";
severity debug 3;
print-category yes;
print-severity yes;
print-time yes;
};
channel security_info {
file "/var/log/named-auth.info";
severity info;
print-category yes;
print-severity yes;
print-time yes;
};
category update { update_debug; };
category security { security_info; };
};

// Caching only name server
zone "." {
type hint;
file "named.ca";
};

zone "0.0.127.in-addr.arpa" {
type master;
notify no;
file "named.local";
};
// Primary Zone for my_domain.com
zone "*my_domain*.com" {
type slave;
file "external.db";
// IP address of master server(s).
masters {
*master's IP*;
};
notify no;
};

zone "*my_reverse_subnet*.in-addr.arpa" {
type slave;
file "external.rr.db";
masters {
*master's IP*;
};
notify no;
};
[/code]
Notice:
- The master's /etc/named.con includes a "notify yes;" command which will cause the server to notify all the slaves whenever a change in the zone occurs.
- The master DNS will notice changes in the domain's zone when/if the zone's serial number has increased.
- The master's DNS will notify all slave servers that are specified in the zone's file.
- Once notified, all slave DNS will initiate a zone transfer request to the master.

...and here is my zone's file; private info has been replaced just like above.

[code]
$TTL 86400
@ IN SOA ns1.*my_domain*.com. *admin.my_domain*.com. (
2010013001 ; serial (date)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
NS *domain name of master*. *** notice there is a "dot" after the FQDN
NS *domain name of slave #1*. *** notice there is a "dot" after the FQDN
NS *domain name of slave #2*. *** notice there is a "dot" after the FQDN
MX 10 *server handling the mail for the domain*. *** notice there is a "dot" after the FQDN
host_name_master A *IP address of master*
host_name_slave#1 A *IP address of slave#1*
host_name_slave#2 A *IP address of slave#2*
[/code]
[Moderator edited to insert [i]code[/i] tags to preserve formatting.]

Post Reply