zone"example.com" IN {
type master;
file "example.com.zone";
allow-transfer { slave_ip_address:
};
};
zone"xx.168.192.in-addr.arpa" IN {
type master;
file "xx.168.192.zone";
allow-transfer{ slave_ip_address;
};
};
2、创建正向解析区域文件example.com.zone,并添加以下内容:
$TTL 86400
@ IN SOA ns1.example.com. admin.example.com. (
2022010101 ; Serial
3600 ; Refresh
1800 ; Retry
604800 ; Expire
86400 ) ; Minimum TTL
;
@ IN NS ns1.example.com.
@ IN NS ns2.example.com.
ns1 IN A master_ip_address
ns2 IN A slave_ip_address
www IN A web_server_ip_address
3、创建反向解析区域文件xx.168.192.zone,并添加以下内容:
$TTL 86400
@ IN SOA ns1.example.com. admin.example.com. (
2022010101 ; Serial
3600 ; Refresh
1800 ; Retry
604800 ; Expire
86400 ) ; Minimum TTL
;
@ IN NS ns1.example.com.
@ IN NS ns2.example.com.
1 IN PTR ns1.example.com.
2 IN PTR ns2.example.com.
10 IN PTR www.example.com.