Centos 5.4(x86_64)的DNSparsing困境

我最近在虚拟机中安装了Centos 5.4(x86_64) 麻烦的是我不能让互联网工作。

Ping解决google.com ips,名称服务器ips工作正常,但DNS查询查询不。

以下是我所做的一些挖掘工作:

dig google.com ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5 <<>> google.com ;; global options: printcmd ;; connection timed out; no servers could be reached nslookup google.com ;; connection timed out; no servers could be reached 

在挖掘和nslookup期间,我没有观察到任何UDP / TCP数据包

 cat /etc/resolv.conf ; generated by /sbin/dhclient-script nameserver 208.67.220.220 nameserver 208.67.222.222 

另外我的/etc/nsswitch.conf是为了包含“hosts:files dns”

什么可能是错的?

  1. 排除iptables

    服务iptables停止

做nslookup。 如果它工作,然后检查您的规则集,然后重试。 不要忘记重新启动iptables。

  1. 尝试telnet到这些IP地址的端口53:

    telnet 208.67.220.220 53

你应该看到:

 $ telnet 208.67.220.220 53 Trying 208.67.220.220... Connected to 208.67.220.220. Escape character is '^]'. 

你能ping通resolv.conf中指定的DNS服务器吗?

我有完全相同的问题,这个问题指出我要解决这个问题。

在我的头撞墙三天后,事实certificate,我的调制解调器是问题。 DHCP设置在本地,这对我的防火墙造成了严重的破坏。

closures调制解调器上的DHCP并重新启动后,我的名字服务器工作正常。