域名不能parsing@ Debian VPS

我有一个相当普遍的问题,除了我发现的所有解决scheme都不适合我。

我有我的VPS,运行Debian 5 / Debian 6 / CentOS 5.5 / 任何其他操作系统,我已经尝试 ,重build和重新安装。 一旦启动,networking工作正常,我可以ping IP,例如8.8.8.8 。 这里的问题是,VPS无法parsing主机名。

首先,默认的resolv.conf看起来很好:

 vps:~# cat /etc/resolv.conf nameserver 8.8.8.8 nameserver 8.8.4.4 

这些主机默认由我的VPS提供商设置。 该文件不会被重写。 并且每次重启都会恢复默认版本。

更新 8.8.8.8服务器的工作原理,我已经尝试在我的家用电脑上。 以及我已经尝试了我的家庭ISP的DNS服务器上的VPS – 仍然没有成功。

正如我已经说过的,ping也很好:

 vps:~# ping -c 4 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=7.63 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=7.55 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=7.08 ms 64 bytes from 8.8.8.8: icmp_seq=4 ttl=55 time=7.30 ms 

以下是/etc/hosts文件的样子:

 vps:~# cat /etc/hosts ::1 localhost.localdomain localhost 127.0.0.1 localhost.localdomain localhost # Auto-generated hostname. Please do not remove this comment. *my-actual-IP-goes-here* example.com vps 

更新 /etc/nsswitch.conf的内容:

 vps:~# cat /etc/nsswitch.conf passwd: compat group: compat shadow: compat hosts: files dns networks: files protocols: db files services: db files ethers: db files rpc: db files netgroup: nis 

/etc/network/interfaces文件具有configuration的100%工作备份版本,我可以在ifconfig输出中看到。 /ver/log/syslog文件没有说任何相关的东西,除了

sm-mta [1443]:gethostbyaddr( my-actual-IP-goes-here )失败:2

更新 bind安装:

 vps:~# apt-cache policy bind9 bind9: Installed: 1:9.5.1.dfsg.P3-1+lenny1 Candidate: 1:9.5.1.dfsg.P3-1+lenny1 Version table: *** 1:9.5.1.dfsg.P3-1+lenny1 0 100 /var/lib/dpkg/status 

/etc/nsswitch.conf是否设置为使用DNSparsing?

还有一个想法,你是否validation了DNS服务器正常运行和configuration正确(没有在您提供的信息中显示)?

那么,我早上起床,一切正常。 除了我在更新和评论中提到的内容之外,我什么都没有做到。 所以我想这是DC的外部问题。

而现在,因为一切正常,这几乎是“幸福的结局”。 谢谢您的回复。

尝试使用dig来解决当前的dns问题( apt-get install dnsutils

另外要真正使用你的绑定安装,你需要指出你的resolv.conf

nameserver 127.0.0.1