Macのbindサーバをスレーブ設定を行った.

スレーブ設定は,/etc/named.confを変えるだけでできる.

//
// Include keys file
//
include "/etc/rndc.key";

// Declares control channels to be used by the rndc utility.
//
// It is recommended that 127.0.0.1 be the only address used.
// This also allows non-privileged users on the local host to manage
// your name server.

//
// Default controls
//
controls {
    inet 127.0.0.1 port 54 allow {any;}
    keys { "rndc-key"; };
};

options {
    directory "/var/named";
    /*
     * If there is a firewall between you and nameservers you want
     * to talk to, you might need to uncomment the query-source
     * directive below.  Previous versions of BIND always asked
     * questions using port 53, but BIND 8.1 uses an unprivileged
     * port by default.
     */
    // query-source address * port 53;
    // クエリを許可する範囲の指定
    allow-query { 192.168.1.0/24; 127.0.0.1; };
    // ゾーンの転送を行わない
    allow-transfer { none; };
    // ローカルで名前解決ができないときの問い合わせ先
    forwarders { 192.168.1.1; };
    // まず, フォワーダーに問い合わせそれでなければ, 再帰検索をかける
    forward first;
    // 再帰検索を行うホストの設定
    allow-recursion { 127.0.0.1; };
    //ゾーンステートメントで各ゾーンの設定を行う
    empty-zones-enable no;
};
//
// a caching only nameserver config
//
zone "." IN {
    type hint;
    file "named.ca";
};

zone "localhost" IN {
    type master;
    file "localhost.zone";
    allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
    type master;
    file "named.local";
    allow-update { none; };
};

zone "1.168.192.in-addr.arpa" IN {
    type slave;
    masters { 192.168.1.54};
    file "db.192.168.1";
};

zone "my-home" IN {
    type slave;
    masters { 192.168.1.54};
    file "db.my-home";
};

zone "unix-like.dyndns-web.com" IN {
    type slave;
    masters { 192.168.1.54};
    file "db.unix-like.dyndns-web.com";
};

logging {
        category default {
                _default_log;
        };

        channel _default_log  {
                file "/Library/Logs/named.log";
                severity info;
                print-time yes;
        };
};

変更点は,各ゾーン設定でtypeの部分とmastersの部分である.
typeはslaveに変更し,mastersはマスターサーバのIPアドレスを指定する.
これで,ゾーン転送を受け付けて,レコードを更新する.


[ad#ad-1]