大网数据广告活动
服务器运维问答

BIND zone also-notify syntax

· 52CE 我爱测

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/me…

问题原文

原帖链接 · user192702 · CC BY-SA 3.0

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 · CC BY-SA 3.0

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";
};

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2014-01-26)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。