BIND zone also-notify syntax

bind

Given the following my BIND 9 is not able to start.

acl ns2 { 192.168.10.50; };
zone "10.168.192.in-addr.arpa" IN {
        also-notify { ns2 port 53; };
        type master;
        file "192.168.10.db";
};

It's writing the following to the /var/log/messages file.

[root@dev bind]# tail /var/log/messages
Jan 25 18:41:05 dev named[22863]: found 4 CPUs, using 4 worker threads
Jan 25 18:41:05 dev named[22863]: using 4 UDP listeners per interface
Jan 25 18:41:05 dev named[22863]: using up to 4096 sockets
Jan 25 18:41:05 dev named[22863]: loading configuration from '/etc/named.conf'
Jan 25 18:41:05 dev named[22863]: /etc/named.conf:18: missing ';' before 'port'
Jan 25 18:41:05 dev named[22863]: /etc/named.conf:18: missing ';' before '53'
Jan 25 18:41:05 dev named[22863]: /etc/named.conf:23: missing ';' before 'port'
Jan 25 18:41:05 dev named[22863]: /etc/named.conf:23: missing ';' before '53'
Jan 25 18:41:05 dev named[22863]: loading configuration: failure
Jan 25 18:41:05 dev named[22863]: exiting (due to fatal error)

This is strange because per their guide here, the correct statement syntax is

[ also-notify { ip_addr [port ip_port] ; [ ip_addr [port ip_port] ; ... ] }; ]

Best Answer

I've fixed it by doing the following... If anyone knows why we now have both masters and acl, rather than just acl, please enlighten me.

acl ns2 { 192.168.10.50; };
masters ns2 { 192.168.10.50 port 53; };

options {
        allow-query { any; };
        allow-recursion { localnets; };
        allow-transfer { ns2; };
        directory "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        pid-file "/var/run/named.pid";
};

zone "10.168.192.in-addr.arpa" IN {
        also-notify { ns2; };
        type master;
        file "192.168.10.db";
};