為所有區域綁定 DNS 從屬

為所有區域綁定 DNS 從屬

我們Bind9作為從機運行,但我想知道它沒有像type slavenamed.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檔。

相關內容