分别检测两个配置文件是否有问题: named-checkzone "abc.com" abc.com.zone named-checkzone "137.168.192.in-addr.arpa" 192.168.zone 重启named服务,测试 dig @127.0.0.1 www.abc.com dig @127.0.0.1 -x 192.168.137.11 vim /etc/named.conf //增加 zone "abc.com" IN { type master; file "abc.com.zone"; }; zone "137.168.192.in-addr.arpa" IN { type master; file "192.168.zone"; };
编辑zone文件: vim /var/named/abc.com.zone//增加 $TTL 600 @ IN SOA abc.com. root.abc.com. ( 2013081601 1H 10M 7D 1D ) IN NS ns.abc.com. IN MX 10 mail.abc.com. ns IN A 192.168.0.11 www IN A 192.168.137.73 mail IN A 192.168.137.10 bbs IN CNAME www.abc.com.
编辑反解析文件: vim /var/named/192.168.zone //增加 $TTL 600 @ IN SOA ns.abc.com. root.abc.com. ( 2013081601 1H 10M 7D 1D ) @ IN NS ns.abc.com. 10 IN PTR ns.abc.com. 11 IN PTR mail.abc.com. 73 IN PTR www.abc.com.