17 May 2012

BIND DNS server slave config on ubuntu

apt-get update
apt-get install bind9


Edit named.conf.options as usual.


Edit named.conf.local and add zone


zone "test.net" {
        type slave;
        file "db.test.net";
        masters { 172.16.99.200; };
};

where 172.16.99.200 is the master DNS server. The above relative syntax of the file will be /var/cache/bind/*. If you want to specify a particular location such as...

zone "test.net" {
        type slave;
        file "/etc/bind/zones/db.test.net";
        masters { 172.16.99.200; };
};

...then you may need to modify permissions as well as apparmour to allow writing to the directory.

chown -R root:bind /etc/bind/zones
chmod -R 770 /etc/bind/zones

nano /etc/apparmor.d/usr.sbin.named

    add this line somewhere:
  /etc/bind/slave/* rw,

/etc/init.d/bind9 restart on the slave and check the zone directory to see if populated. If not tail -f /var/log/syslog will help troubleshoot.

No comments:

Post a Comment