このページはリンク切れを生じないために残してありますが、内容は古くなっていますのでご注意下さい。
マスタになってみる
起動のページで、既にexample1.jpゾーンのプライマリとしては動作していますが、スレーブになってみるで述べたように、Knot DNSはxfr-outを設定しないと、ゾーン転送を拒否するので、マスタとしては動作しません。
example2.jpゾーンのマスタでもある203.0.113.1がexample1.jpゾーンのスレーブになれるようにするには、knot.confのexample1.jpゾーンの設定にxfr-outとnitify-outを、remotes{}にはxfr-outとnotify-outで参照するエントリ、ここではslave-serverという名前の設定を追加して
system {
storage "/proj/knot-dns/var";
}
interfaces {
eth0 {
address 192.0.2.1;
}
}
remotes {
ns.example2.jp {
address 203.0.113.1;
port 53;
}
slave-server {
address 203.0.113.1;
port 53;
}
}
zones {
example1.jp {
file "/proj/dns/namedb/example1.jp";
xfr-out slave-server;
notify-out slave-server;
}
example2.jp {
file "/proj/dns/namedb/example2.jp";
xfr-in ns.example2.jp;
notify-in ns.example2.jp;
}
}
のようにします。
それでは、設定を追加したknot.confをKnot DNSに再読み込みさせましょう。
% /usr/bin/sudo /proj/knot-1.0.6/sbin/knotc reload
2012-06-24T19:05:01.570235+09:00 Using '/proj/knot-dns/etc/knot.conf' as default configuration.
2012-06-24T19:05:01.578157+09:00 Server reload queued - OK.
もう1度ゾーン転送を要求してみます。
ns.example2.jp% dig @192.0.2.1 example1.jp axfr
; <<>> DiG 9.6.-ESV-R5-P1 <<>> @192.0.2.1 example1.jp axfr
; (1 server found)
;; global options: +cmd
example1.jp. 86400 IN SOA ns.example1.jp. hostmaster.example1.jp. 2012040101 1200 900 2419200 900
example1.jp. 86400 IN NS ns.example1.jp.
ns.example1.jp. 86400 IN A 192.0.2.1
example1.jp. 86400 IN SOA ns.example1.jp. hostmaster.example1.jp. 2012040101 1200 900 2419200 900
;; Query time: 0 msec
;; SERVER: 192.0.2.1#53(192.0.2.1)
;; WHEN: Sun Jun 24 19:06:31 2012
;; XFR size: 4 records (messages 1, bytes 167)
今度はゾーン転送できるようになっています。
Copyright(c) 2012 Koh-ichi Ito, All rights reserved
ページ先頭のアイコン: Copyright(c) 2017 いらすとや, All rights reserved.
Last update: $Date: 2019-08-16 11:45:02 +0900 (Fri, 16 Aug 2019) $
[スレーブになってみるへ|indexへ|TSIGでゾーン転送を認証してみるへ]