我们Bind9
作为从机运行,但我想知道它没有像type slave
named.conf 中那样的任何声明,但我可以看到来自主机的更新条目。我们只在主服务器中添加条目并添加新区域,但它会自动复制到从服务器,我们永远不需要在从服务器上添加或触摸任何内容。该从站如何配置?
named.conf
我看到这样的条目,是否足以使其成为所有区域的奴隶?
allow-transfer { acl-nameservers; };
allow-new-zones yes;
server 192.168.100.10 { keys dns-xfer; };
also-notify { 192.168.100.10; };
答案1
可能您的所有区域都是通过命令添加的rndc addzone
。这是允许的,因为allow-new-zones yes
man rndc
:
rndc addzone zone [class [view]] configuration
Add a zone while the server is running. This command requires the
allow-new-zones option to be set to yes. The configuration string
specified on the command line is the zone configuration text that
would ordinarily be placed in named.conf.
The configuration is saved in a file called hash.nzf, where hash
is a cryptographic hash generated from the name of the view. When
named is restarted, the file will be loaded into the view
configuration, so that zones that were added can persist after a
restart.
This sample addzone command would add the zone example.com to the
default view:
$rndc addzone example.com '{ type master; file "example.com.db"; };'
所以你可以看看是否在bind的工作目录(例如/var/lib/named)中找到了这样的*.nzf或*.db文件。