Jam*_*ber 3 networking ubuntu ping
我在我的服务器上运行 Ubuntu 12.04,但自从 10.04 升级后,我无法再访问服务器的任何外部资源。
我可以通过 SSH 进入盒子,但从这里我无法访问任何东西。至少,我不能ping,挖掘等。
我已经提供了所有我认为可能会给我更多信息的东西,但在这里看不到任何明显的错误。
解析
root@sub:~# resolveip google.com
resolveip: Unable to find hostid for 'google.com': try again
Run Code Online (Sandbox Code Playgroud)
平
root@sub:~# ping google.com
ping: unknown host google.com
Run Code Online (Sandbox Code Playgroud)
路由 -n
root@sub:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 77.68.108.1 0.0.0.0 UG 100 0 0 eth0
77.68.108.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
Run Code Online (Sandbox Code Playgroud)
iptables -L
root@sub:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Run Code Online (Sandbox Code Playgroud)
任何想法自升级以来发生了什么变化?
首先尝试 ping 您的网关77.68.108.1
。如果你能做到,那么
我认为/etc/resolv.conf
没有正确配置。
只需打开/etc/resolv.conf
文件。在该文件的顶部,添加如下一行:
nameserver 8.8.8.8
Run Code Online (Sandbox Code Playgroud)
这是所有 DNS 解析请求将定向到的解析器。8.8.8.8
并且8.8.4.4
是任何人都可以使用的两个开放式解析器。
在此之后,您应该能够ping google.com
。
归档时间: |
|
查看次数: |
38936 次 |
最近记录: |