bind catlog

1874 단어 DNS

참조: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

좋은 웹페이지 즐겨찾기