bind catlog

参考:https://kb.isc.org/article/AA-01401/0/A-short-introduction-to-Catalog-Zones.html 

vim /usr/local/bind/var/catalog.example.db

; catalog.example.db
catalog.example. IN SOA . . 1 86400 3600 86400 3600
catalog.example. IN NS invalid.
version IN TXT "1"

master 配置文件

options {
    listen-on port 53 { any; };
    allow-new-zones yes;
};
zone "catalog.example" {
        type master;
        file "/usr/local/bind/var/catalog.example.db";
        allow-transfer { any; };
        allow-update { any; };
        also-notify { 10.0.0.2; };
        notify explicit;
};

slave 配置文件

options {
    catalog-zones {
        zone "catalog.example" default-masters { 10.0.0.1; };
    };
};
zone "catalog.example" {
        type slave;
        file "/usr/local/bind/var/slaves/catalog.example.db";
        masters { 10.0.0.1; };
};

增加zone

; example.com.db
example.com. 3600 IN SOA . . 1 3600 3600 3600 3600
example.com. IN NS ns1.isc.org.
ff123.com. 3600 IN SOA . . 1 3600 3600 3600 3600
ff123.com. IN NS ns1.isc.org.

./sbin/rndc -c etc/rndc.conf -k etc/rndc.conf -y rndc-key addzone example.com '{type master; file "example.com.db";};'

验证:
# ./bin/dig +short @10.0.0.1 soa example.com
. . 1 3600 3600 3600 3600

增加slave域名

cat << __EOF | ./bin/nsupdate
server 10.10.132.252 53
update add c5e4b4da1e5a620ddaa3635e55c3732a5b49c7f4.zones.catalog.example 3600 IN PTR example.com
send 
__EOF

cat << __EOF | ./bin/nsupdate
server 10.10.132.252 53
update add c5e4b4da1e5a620ddaa3635e55c3732a5b49c7f4.zones.catalog.example 3600 IN PTR ff123.com
send 
__EOF


验证:
# ./bin/dig +short @10.0.0.2 soa example.com
. . 1 3600 3600 3600 3600
发布了66 篇原创文章 · 获赞 8 · 访问量 14万+

猜你喜欢

转载自blog.csdn.net/gnufre/article/details/81130060
今日推荐