I am new to DNS Setup, i have recently setup DNS server Master and Slave using bind9. Here is my config…
Master DNS – ns1.example.com. – 192.0.2.1
Slave DNS – ns2.example.com. – 192.0.2.2
named.conf.options
options {
directory "/var/cache/bind";
recursion no;
allow-transfer { none; };
dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
named.conf.local
zone "example.com" {
type master;
file "/etc/bind/zones/db.example.com";
allow-transfer { 192.0.2.2; };
};
Slave named.conf.local
zone "example.com" {
type slave;
file "db.example.com";
masters { 192.0.2.1; };
};
This setup works perfect, but now i want to add another domain. So should i only update named.conf.local
at master Sever and DNS server would be notified automatically…
For example…
zone "example2.com" {
type master;
file "/etc/bind/zones/db.example.com";
allow-transfer { 192.0.2.2; };
};
I am really confused with this, please suggest next step when i add more domains zones. Thank You.
Best Answer
The traditional approach is very straightforward. You described how you set up one zone properly with a master and a slave, just do the exact same thing for the next zone as well and that will work too.
Ie, add a
type master
zone on one server and atype slave
zone on the other server.Notify messages make it possible to get the servers with slave zones to update immediately instead of waiting for the
SOA REFRESH
timer to expire, but these are not used to add new zones.However, starting with BIND 9.11 there's also the Catalog Zones feature, which allows setting up a zone with special semantics which defines a list of zones that should be added as slave zones as this special zone is updated with new entries.