5

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] ; ... ] }; ]
user192702
  • 931
  • 5
  • 15
  • 22
  • And `ns2` is not an IP address. – Michael Hampton Jan 26 '14 at 02:57
  • @MichaelHampton Thanks but I actually have an acl line above that to specify the IP address for ns2. Just edited my post to include that acl line. Can you have a look again? – user192702 Jan 26 '14 at 02:59
  • Try with an IP, not an ACL. Also be aware that the syntax for `also-notify` changed with Bind 9.9. Which one are you using exactly? – Marki Jan 26 '14 at 03:03
  • @Marki I'm using 9.9.4-P2. Are you saying the acl line is no longer supported in 9.9.4-P2? – user192702 Jan 26 '14 at 03:09
  • I'm saying the format for `also-notify` changed. http://www.zytrax.com/books/dns/ch7/xfer.html#also-notify – Marki Jan 26 '14 at 03:11

3 Answers3

4

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";
};
user192702
  • 931
  • 5
  • 15
  • 22
  • 1
    1) You can (should) accept your own answer, too. 2) In your answer don't make a new question, instead of it formulate as a new question. – peterh May 30 '15 at 03:12
  • @user192702 .... This is not working if i add segment instead of IP in acl ns2... any idea why so ? I am not finding any way of having segments (instead of IPs) in "also-notify" parameter. – Gaurav Kansal Dec 22 '21 at 06:38
0

you only need to put:

masters "acl-name" { ip1; ip2; ip3; etc;}

and then call it after with also-notify { acl-name;}; sentence.

Pedro
  • 1
0

You can simply change your zone as follow:

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

If the slave is running on another port rather than 53, you can specify if changing the allow-notify as follow:

also-notify { 192.168.10.50 port xxx; };

Unless port is specified, bind send the notification to port 53.

David
  • 101
  • 1
  • 3