step2:vim /etc/bind/named.conf
include "/etc/bind/rndc.key";
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
//include "/etc/bind/named.conf.default-zones";
include "/etc/bind/named.conf.internal-zones";
include "/etc/bind/named.conf.external-zones";
step3:vim /etc/bind/named.conf.options
options {
directory "/etc/bind";
dump-file "/etc/bind/dump.db";
listen-on port 53 { any; };
allow-query { any; };
allow-transfer { xxx.xxx.xxx.xxx; }; //設定slave ip
recursion no;
version "U guess!";
};
step4:cp named.conf.default-zones named.conf.external-zones
view "external" {
match-clients {
any;
};
zone "." {
type hint;
file "db.root";
};
zone "test.com.tw" {
type master;
file "test.com.tw.wan";
allow-update { xxx.xxx.xxx.xxx; };//允許slave ip 更新
};
zone "xxx.xxx.xxx.in-addr.arpa" {
type master;
file "db.xxx.xxx.xxx";
allow-update { xxx.xxx.xxx.xxx; };
};
};
step5:cp db.0 test.com.tw.wan
$TTL 86400
@ IN SOA ns1.test.com.tw. root.test.com.tw (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
;
@ IN NS ns1.test.com.tw.
@ IN NS ns2.test.com.tw.
@ IN MX 10 mail.test.com.tw.
ns1 IN A xxx.xxx.xxx.xxx
ns2 IN A xxx.xxx.xxx.xxx
mail IN A xxx.xxx.xxx.xxx
step6: cp db.0 db.xxx.xxx.xxx.xxx
$TTL 86400
@ IN SOA ns1.test.tw. root.test.com.tw. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
;
@ IN NS ns1.test.com.tw.
xx IN PTR ns1.test.com.tw.
xx IN PTR mail.test.com.tw.
step7:/etc/init.d/bind9 restart
沒有留言:
張貼留言