Chinaunix

标题: DNS服务器 做转发问题 [打印本页]

作者: tony-jia    时间: 2005-09-07 14:14
标题: DNS服务器 做转发问题
DNS服务器(IP:192.168.101.201)NAMED.CONF代码如下:
  1. //
  2. // named.conf for Red Hat caching-nameserver
  3. //

  4. options {
  5.         directory "/var/named";
  6.         dump-file "/var/named/data/cache_dump.db";
  7.         statistics-file "/var/named/data/named_stats.txt";
  8.         forwarders {202.103.24.68;211.91.120.129;};
  9.         allow-query {192.168.0.0/16;};
  10.         /*
  11.          * If there is a firewall between you and nameservers you want
  12.          * to talk to, you might need to uncomment the query-source
  13.          * directive below.  Previous versions of BIND always asked
  14.          * questions using port 53, but BIND 8.1 uses an unprivileged
  15.          * port by default.
  16.          */
  17.          // query-source address * port 53;
  18. };

  19. //
  20. // a caching only nameserver config
  21. //
  22. controls {
  23.         inet 127.0.0.1 allow { localhost; } keys { rndckey; };
  24. };

  25. zone "." IN {
  26.         type hint;
  27.         file "named.ca";
  28. };

  29. zone "localdomain" IN {
  30.         type master;
  31.         file "localdomain.zone";
  32.         allow-update { none; };
  33. };

  34. zone "localhost" IN {
  35.         type master;
  36.         file "localhost.zone";
  37.         allow-update { none; };
  38. };

  39. zone "0.0.127.in-addr.arpa" IN {
  40.         type master;
  41.         file "named.local";
  42.         allow-update { none; };
  43. };

  44. 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 {
  45.         type master;
  46.         file "named.ip6.local";
  47.         allow-update { none; };
  48. };

  49. zone "255.in-addr.arpa" IN {
  50.         type master;
  51.         file "named.broadcast";
  52.         allow-update { none; };
  53. };

  54. zone "0.in-addr.arpa" IN {
  55.         type master;
  56.         file "named.zero";
  57.         allow-update { none; };
  58. };

  59. include "/etc/rndc.key";
复制代码


在本机做DIG测试:
  1. [root@localhost ~]# dig @192.168.101.201 163.com +trace

  2. ; <<>;>; DiG 9.3.1 <<>;>; @192.168.101.201 163.com +trace
  3. ; (1 server found)
  4. ;; global options:  printcmd
  5. .                       510569  IN      NS      E.ROOT-SERVERS.NET.
  6. .                       510569  IN      NS      F.ROOT-SERVERS.NET.
  7. .                       510569  IN      NS      G.ROOT-SERVERS.NET.
  8. .                       510569  IN      NS      H.ROOT-SERVERS.NET.
  9. .                       510569  IN      NS      I.ROOT-SERVERS.NET.
  10. .                       510569  IN      NS      J.ROOT-SERVERS.NET.
  11. .                       510569  IN      NS      K.ROOT-SERVERS.NET.
  12. .                       510569  IN      NS      L.ROOT-SERVERS.NET.
  13. .                       510569  IN      NS      M.ROOT-SERVERS.NET.
  14. .                       510569  IN      NS      A.ROOT-SERVERS.NET.
  15. .                       510569  IN      NS      B.ROOT-SERVERS.NET.
  16. .                       510569  IN      NS      C.ROOT-SERVERS.NET.
  17. .                       510569  IN      NS      D.ROOT-SERVERS.NET.
  18. ;; Received 436 bytes from 192.168.101.201#53(192.168.101.201) in 0 ms

  19. com.                    172800  IN      NS      J.GTLD-SERVERS.NET.
  20. com.                    172800  IN      NS      K.GTLD-SERVERS.NET.
  21. com.                    172800  IN      NS      L.GTLD-SERVERS.NET.
  22. com.                    172800  IN      NS      M.GTLD-SERVERS.NET.
  23. com.                    172800  IN      NS      A.GTLD-SERVERS.NET.
  24. com.                    172800  IN      NS      B.GTLD-SERVERS.NET.
  25. com.                    172800  IN      NS      C.GTLD-SERVERS.NET.
  26. com.                    172800  IN      NS      D.GTLD-SERVERS.NET.
  27. com.                    172800  IN      NS      E.GTLD-SERVERS.NET.
  28. com.                    172800  IN      NS      F.GTLD-SERVERS.NET.
  29. com.                    172800  IN      NS      G.GTLD-SERVERS.NET.
  30. com.                    172800  IN      NS      H.GTLD-SERVERS.NET.
  31. com.                    172800  IN      NS      I.GTLD-SERVERS.NET.
  32. ;; Received 497 bytes from 192.203.230.10#53(E.ROOT-SERVERS.NET) in 2676 ms

  33. 163.com.                172800  IN      NS      ns.nease.net.
  34. 163.com.                172800  IN      NS      ns2.nease.net.
  35. 163.com.                172800  IN      NS      ns3.nease.net.
  36. ;; Received 135 bytes from 192.48.79.30#53(J.GTLD-SERVERS.NET) in 330 ms

  37. 163.com.                600     IN      A       220.181.29.154
  38. 163.com.                18000   IN      NS      ns3.nease.net.
  39. 163.com.                18000   IN      NS      ns.nease.net.
  40. 163.com.                18000   IN      NS      ns2.nease.net.
  41. ;; Received 151 bytes from 202.106.185.75#53(ns.nease.net) in 29 ms
复制代码

本机做NSLOOKUP测试:
  1. [root@localhost ~]# nslookup
  2. >; server 192.168.101.201
  3. Default server: 192.168.101.201
  4. Address: 192.168.101.201#53
  5. >; 163.com
  6. Server:         192.168.101.201
  7. Address:        192.168.101.201#53

  8. Non-authoritative answer:
  9. Name:   163.com
  10. Address: 220.181.29.154
复制代码

客户机做DIG:
  1. [root@test root]# dig @192.168.101.201 163.com +trace

  2. ; <<>;>; DiG 9.3.0 <<>;>; @192.168.101.201 163.com +trace
  3. ;; global options:  printcmd
  4. ;; connection timed out; no servers could be reached
复制代码

做NSLOOKUP测试:
  1. [root@test root]# nslookup
  2. >; server 192.168.101.201
  3. Default server: 192.168.101.201
  4. Address: 192.168.101.201#53
  5. >; 163.com
  6. ;; connection timed out; no servers could be reached
复制代码


请问为什么会出现这样的错误啊
服务器本机可以做解析
客户机不能返回查询的结果
问题出在哪里,请高手指点
作者: jianasonic    时间: 2005-09-07 15:43
标题: DNS服务器 做转发问题
懒的看你的这么多代码。。。
服务器可以自己解析。。客户不能。。问题出在客户配置了呗。。。。。。。。。
作者: tony-jia    时间: 2005-09-07 16:21
标题: DNS服务器 做转发问题
客户端都不能查询啊`
作者: 網中人    时间: 2005-09-07 16:40
标题: DNS服务器 做转发问题
firewall ?
作者: tony-jia    时间: 2005-09-07 16:54
标题: DNS服务器 做转发问题
做TELNET 192.168.101.201 53
没问题
作者: tony-jia    时间: 2005-09-07 16:58
标题: DNS服务器 做转发问题
我用的是fedora C4
作者: diancn    时间: 2005-09-07 17:26
标题: DNS服务器 做转发问题
客户机是否无法访问服务器的UDP/53端口。telnet检查的是TCP端口。服务器上的防火墙是否有设置。
作者: tony-jia    时间: 2005-09-07 17:28
标题: DNS服务器 做转发问题
查看了防火墙配置 TCP/UDP 的53 端口都是打开的
作者: 網中人    时间: 2005-09-08 01:22
标题: DNS服务器 做转发问题
目前資料, 無助於更進一步的討論.
作者: tony-jia    时间: 2005-09-08 08:19
标题: DNS服务器 做转发问题
还需要什么方面的信息?
作者: tony-jia    时间: 2005-09-08 08:59
标题: DNS服务器 做转发问题
谁能帮帮我啊
作者: 網中人    时间: 2005-09-08 13:23
标题: DNS服务器 做转发问题
好歹有 log, 有網絡圖, 有 firewall 規則, 有系統版本....

都沒有, 怎幫?
換做是我問你, 你會怎幫呢?
作者: tony-jia    时间: 2005-09-08 14:46
标题: DNS服务器 做转发问题
偶是新人  不晓得还需要这些信息
作者: tony-jia    时间: 2005-09-08 14:52
标题: DNS服务器 做转发问题
好了 是防火墙的问题 LINUX 上面只开了53 的TCP UDP没开
lokkit -q --disabled后就可以返回查询了

但是为什么不开UDP协议就不能响应查询?
作者: jackylau    时间: 2005-09-09 17:01
标题: DNS服务器 做转发问题
[root@localhost root]# man lokkit
No manual entry for lokkit
[root@localhost root]#
作者: tony-jia    时间: 2005-09-14 09:59
标题: DNS服务器 做转发问题
[root@test root]# lokkit --help
Usage: lokkit [OPTION...]
  -f, --fwtype                                Write Red Hat style
                                              /etc/sysconfig/iptables rules,
                                              instead of a shell script
  -q, --quiet                                 Run noninteractively; process
                                              only command-line arguments
  -n, --nostart                               Configure firewall but do not
                                              activate it
  --high                                      Enable 'high' security level
                                              (default)
  --medium                                    Enable 'medium' security level
  --disabled                                  Disable firewall
  --dhcp                                      Allow DHCP through the firewall
  -p, --port=port:protocol (e.g, ssh:tcp)     Allow specific ports through the
                                              firewall
  -t, --trust=device to trust                 Allow all traffic on the
                                              specified device

Help options:
  -?, --help                                  Show this help message
  --usage                                     Display brief usage message




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2