PDA

View Full Version : Tips on setting up slave dns?


hookooekoo
25th June 2004, 03:17 PM
Ok now that I got the master up and running, I must next get a slave going. I have never done this before, and not sure on a few things. Any hints or tips would be appreciated.

In the named.conf acl do you add the "other" server in both the slave and the master?

Obviously in the named.conf the zones are slave? and not master.

What do I do to tell the master to update the slave? Or the Slave to sycn with the master?

I should set the SOA one number higher in the master in the beginning?

Thanks.

jeru
28th June 2004, 01:14 AM
I guess it all depends on how you want to do things, I have the same name servers for all of my domains so it's easy to configure default once and have it's configuration used from then on out.

So on the master, I would set something like; (and your slave you do the same type of thing since in reality, its just replication... but you probalby don't want my name servers to be able to grab your zone without your permission)

options {
directory "/var/named";
allow-transfer {
xxx.xxx.xxx.xxx;
xxx.xxx.xxx.xxx;
};
notify yes;
};


That will set it to only allow transfers from specific name servers, and notify the slaves by default. This implys that you have correctly added NS RRset's to the domains master record as it is where it gets the information about who to notify. Use something like "dig NS anyhost.com" to see examples of what I am talking about. Yours will look like everybody elses once you have it right.

Also the named will automagically sync by default... So if you don't do anything, your slave will just check for updates periodically. But as for a slave zone, on the secondary name server... Just add something like;

zone "example.com" {
type slave;
file "/var/named/example.com.hosts";
masters {
xxx.xxx.xxx.xxx;
};
};

to named.conf

To resync from the slave manually, you do something like this;

rndc reload example.com

"reload" or "refresh" to a slave does a serial-number (SOA) query, followed by a zone transfer if the SOA has incremented.

I'm a bit tired, so I hope I explained things decently.

hookooekoo
28th June 2004, 09:37 PM

Cool, thanks, should be able to figure it out from that.