Ubuntu 18.04
Sponsored Link

BIND : スレーブサーバーとしての設定2018/05/08

 
スレーブサーバーとしての設定を行います。
以下ではマスターサーバーを [172.16.0.82], 別ネットワークにいるスレーブサーバーを [slave.example.host] とした場合の設定です。
[1] マスターサーバ側にゾーン転送許可の設定を記述します。
root@dlp:~#
vi /etc/bind/named.conf.options
options {
        directory "/var/cache/bind";

        // If there is a firewall between you and nameservers you want
        // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.

        // forwarders {
        //      0.0.0.0;
        // };

         allow-query { localhost; 10.0.0.0/24; };
         # ゾーン情報の転送を許可する範囲を追記
         allow-transfer { localhost; 10.0.0.0/24; 172.16.0.80/29; };
         allow-recursion { localhost; 10.0.0.0/24; };

        //========================================================================
        // If BIND logs error messages about the root key being expired,
        // you will need to update your keys.  See https://www.isc.org/bind-keys
        //========================================================================
        dnssec-validation auto;

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { none; };
};

root@dlp:~#
rndc reload

server reload successful
[2] スレーブサーバ側の設定です。
root@slave:~#
vi /etc/bind/named.conf.external-zones
        # 外部向けの定義の中に設定を追記
        zone "srv.world" {
                type slave;
                masters { 172.16.0.82; };
                file "/etc/bind/slaves/srv.world.wan";
        };

root@slave:~#
mkdir /etc/bind/slaves

root@slave:~#
chown bind. /etc/bind/slaves

root@slave:~#
rndc reload

server reload successful
root@slave:~#
ls /etc/bind/slaves

srv.world.wan    
# ゾーンファイルが転送されている
関連コンテンツ