zone "chn.com" IN {
type master;
file "chn";
allow-update{ none; };
};
zone "6.168.192.in-addr.arpa" IN {
type master;
file "arpa";
allow-update { none; };
};
include "/etc/named.rfc1912.zones";
/var/named/chroot/var/named/chn 文件为:
[root@localhost named]# cat chn
$TTL 86400
chn.com. IN SOA dns.chn.com. admin.chn.com. (
2008050300;
10800;
3600;
38400;
86400 );
chn.com. IN NS dns.chn.com.
dns.chn.com. IN A 192.168.6.53 www.chn.com. IN A 192.168.6.80
ftp.chn.com. IN A 192.168.6.21
mail.chn.com. IN A 192.168.6.23
/var/named/chroot/var/named/arpa 文件为:
[root@localhost named]# cat arpa
$TTL 86400
6.168.192.in-addr.arpa. IN SOA dns.chn.com. amdin.chn.com. (
2008050900;
10800;
24800;
24800;
86400 );
6.168.192.in-addr.arpa. IN NS dns.chn.com.
53.6.168.192.in-addr.arpa. IN PTR dns.chn.com.
80.6.168.192.in-addr.arpa. IN PTR www.chn.com.
21.6.168.192.in-addr.arpa. IN PTR ftp.chn.com.
23.6.168.192.in-addr.arpa. IN PTR mail.chn.com.
检查zone:
[root@localhost named]# named-checkzone chn.com chn
zone chn.com/IN: loaded serial 2008050300
OK
[root@localhost named]# named-checkzone 6.168.192.in-addr.arpa arpa
zone 6.168.192.in-addr.arpa/IN: loaded serial 2008050900
OK
重启服务:
[root@localhost named]# /etc/init.d/named restart
Stopping named: [ OK ]
Starting named: [ OK ]
resolve里的确是本机的ip,你的本机不是想做成dns server么,当然通常情况下192.168.5.53应该即是提供解析的主机地址,也是你本机的IP,否则,如果该主机不存在,你的解析请求由谁接收?
另外你可以参考下鸟哥私房菜服务器篇或者去CHINA IT LAB下载LINUX服务的视频.这个东西的确比较复杂,而且是几乎所有服务的根本,最好能自己弄懂,举一反三.语法错误的话,报错信息里已经说的很详细了.仔细检查检查,反解可以先不作,慢慢来>把正解搞定先》