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
Main Topics
Browse All Topics





by: jleviePosted on 2002-05-14 at 06:15:20ID: 7008502
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:
ld.
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.t