无法ping通,虽然可以下载包

Bar*_*run 5 debian ping linux-networking

我已经在 Dell PowerEdge 服务器上安装了 Debian Squeeze。但是,我在配置网络时遇到了一些问题。虽然我可以在我的网络内 ping 机器,但我无法在网络 (google.com) 外 d0。最奇怪的是,我可以从 Debian 存储库更新软件包,然后安装它们!

DNS 解析工作正常 - 已验证 host google.com.

我知道这应该是一些与网络配置和/或防火墙相关的问题。但是,我无法弄清楚这个问题。我真的很感激任何帮助。

目录/etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
#iface eth0 inet dhcp
iface eth0 inet static
    address 10.14.85.244  
    netmask 255.255.0.0
    network 10.14.0.0
    gateway 10.14.1.2
Run Code Online (Sandbox Code Playgroud)

/etc/resolv.conf 的内容

domain sit.iitkgp
search sit.iitkgp
nameserver 10.14.0.2
Run Code Online (Sandbox Code Playgroud)

/etc/apt/apt.conf 的内容

Acquire::http::proxy "http://IP:PORT/";    # Values are actually used here
Acquire::ftp::proxy "ftp://IP:PORT/";
Acquire::https::proxy "https://IP:PORT/";
Run Code Online (Sandbox Code Playgroud)

iptables

# 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)

路线

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.14.0.0       0.0.0.0         255.255.0.0     U     0      0        0 eth0
0.0.0.0         10.14.1.2       0.0.0.0         UG    0      0        0 eth0
Run Code Online (Sandbox Code Playgroud)

在这个ping strace接近尾声时,EAGAIN (Resource temporarily unavailable)可以看到类似的东西。当我 ping(成功)一个内部 IP 地址时,此消息不会出现。请放心,这是一台新服务器,可用的磁盘和内存空间绰绰有余。

更新

刚刚注意到它tcptraceroute工作正常:

# tcptraceroute -i eth0 google.com
Selected device eth0, address 10.14.85.244, port 53532 for outgoing packets
Tracing the path to google.com (74.125.236.80) on TCP port 80 (www), 30 hops max
 1  10.14.1.2  0.310 ms  0.283 ms  0.281 ms
 2  10.151.1.2  0.274 ms  0.253 ms  0.281 ms
 3  maa03s05-in-f16.1e100.net (74.125.236.80) [closed]  0.141 ms  0.172 ms  0.227 ms
Run Code Online (Sandbox Code Playgroud)

更新与解决

我相信 ICMP 消息被防火墙阻止了。此外,相关服务器没有公共 IP 地址。我认为这也与它有关。我可以 ping google.com 的另一台机器有一个公共 IP 地址。

然而,我主要担心的是,这apt-get确实有效,但无效lynxwget。问题出在代理环境变量上。它们是在.bashrc文件中设置的,但不是export-ed。我没有注意到这一点。一旦我导出它们,事情就会顺利进行。

感谢大家提供见解!

vor*_*aq7 21

给你 -俳句北宫。

请参阅您的防火墙。
它会阻止 ICMP。
让它不要那样做。

或者,更明确地说:

Ping 是 ICMP。DNS 是 UDP。下载是TCP。
您遇到的问题是 ping 不起作用,这意味着您的防火墙(或网络上某处的防火墙)可能正在阻止 ICMP。

修复它,或者让负责的网络管理员修复它,ping 将起作用。

  • 学究/你的诗缺乏自然内容/Hokku不是Haiku (5认同)