请教Red Hat Enterprise Linux 5中DNS的配置问题(附有详细的配置信息)
dongyali521521
|
1#
dongyali521521 发表于 2008-12-21 10:57
请教Red Hat Enterprise Linux 5中DNS的配置问题(附有详细的配置信息)
环境设置:服务器的IP是192.168.10.10
安装了3个包:bind,bind-chroot,caching-nameserver 一: cd /var/named/chroot/etc/ vim named.caching-nameserver.conf options { listen-on port 53 { any; }; listen-on-v6 port 53 { ::1; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; query-source port 53; query-source-v6 port 53; allow-query { any; }; }; logging { channel default_debug { file "data/named.run"; severity dynamic; }; }; view localhost_resolver { match-clients { any; }; match-destinations { any; }; recursion yes; include "/etc/named.rfc1912.zones"; }; 二: vim named.rfc1912.zones zone "accuenergy.com" IN { type master; file "accuenergy.com.zone"; allow-update { none; }; }; 三: cd /var/named/chroot/var/named/ cp -p localhost.zone accuenergy.com.zone vim accuenergy.com.zone $TTL 86400 @ IN SOA ns.accuenergy.com. root.ns.accuenergy.com. ( 42 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum IN NS ns.accuenergy.com. ns IN A 192.168.10.10 www IN A 192.168.10.10 ftp IN A 192.168.10.10 IN MX 10 mail.accuenergy.com. mail IN A 192.168.10.10 www2 IN CNAME www.accuenergy.com. 四: vim /etc/resolv.conf nameserver 192.168.10.10 # nslookup > www.accuenergy.com Server: 192.168.10.10 Address: 192.168.10.10#53 Name: www.accuenergy.com Address: 192.168.10.10 五: service named restart tail /var/log/messages Dec 19 16:40:54 localhost named[4952]: command channel listening on ::1#953 Dec 19 16:40:55 localhost named[4952]: zone 0.in-addr.arpa/IN/localhost_resolver: loaded serial 42 Dec 19 16:40:55 localhost named[4952]: zone 0.0.127.in-addr.arpa/IN/localhost_resolver: loaded serial 1997022700 Dec 19 16:40:55 localhost named[4952]: zone 255.in-addr.arpa/IN/localhost_resolver: loaded serial 42 Dec 19 16:40:55 localhost named[4952]: zone 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN/localhost_resolver: loaded serial 1997022700 Dec 19 16:40:55 localhost named[4952]: zone accuenergy.cn/IN/localhost_resolver: loaded serial 42 Dec 19 16:40:55 localhost named[4952]: zone accuenergy.com/IN/localhost_resolver: loaded serial 42 Dec 19 16:40:55 localhost named[4952]: zone localdomain/IN/localhost_resolver: loaded serial 42 Dec 19 16:40:55 localhost named[4952]: zone localhost/IN/localhost_resolver: loaded serial 42 Dec 19 16:40:55 localhost named[4952]: running 六: nmap 192.168.10.10 Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2008-12-19 16:42 EST Interesting ports on 192.168.10.10: Not shown: 1676 closed ports PORT STATE SERVICE 22/tcp open ssh 53/tcp open domain 111/tcp open rpcbind 658/tcp open unknown 七: netstat -nu|grep 53 无内容输出 八: netstat -na|grep 53 tcp 0 0 192.168.10.10:53 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN tcp 0 0 ::1:53 :::* LISTEN tcp 0 0 ::1:953 :::* LISTEN udp 0 0 0.0.0.0:53 0.0.0.0:* udp 0 0 192.168.10.10:53 0.0.0.0:* udp 0 0 127.0.0.1:53 0.0.0.0:* udp 0 0 0.0.0.0:5353 0.0.0.0:* udp 0 0 :::53 :::* udp 0 0 ::1:53 :::* udp 0 0 :::5353 :::* 目前的状况是DNS服务器本身能正常解析,客户端和服务器能正常通讯,客户机的hosts和resolv.conf文件也是没有问题的,但是客户机上就是不能正常解析,请高手指教!! 谢谢!!!! |