我有一台服务器有一些网络问题。服务器在其局域网中,我可以通过VPN访问它。服务器可以切换到局域网中的任何其他机器,但不能在局域网之外。
ping google.com
PING google.com (216.58.217.14) 56(84) bytes of data.
^C
--- google.com ping statistics ---
74 packets transmitted, 0 received, 100% packet loss, time 73001ms但是它可以cURL到相同的地址:
curl google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>另外,如果我想从互联网上获得wget rpm软件包并下载到服务器来安装它,这需要花费很长时间。
curl -O ftp://195.220.108.108/linux/centos/7.3.1611/os/x86_64/Packages/wget-1.14-13.el7.x86_64.rpm
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:01:25 --:--:-- 但我可以通过curl获得网站内容:
curl http://www.rpmfind.net/linux/RPM/centos/7.3.1611/x86_64/Packages/wget-1.14-13.el7.x86_64.html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /linux/RPM/centos/7.3.1611/x86_64/Packages/wget-1.14-13.el7.x86_64.html was not found on this server.</p>
</body></html>如果您想知道我的iptables配置,我已经刷新了它。
sudo iptables -F另外,我让selinux是出于宽容:
sudo setenforce 0但是没有什么能让我的服务器接触到网络之外的任何东西。任何帮助都将不胜感激。
发布于 2017-03-17 09:02:29
您显然是在路由器/防火墙后面,它不允许从该服务器到外部进行ping操作。原因:你可以在dns服务上连接外部(你解决了谷歌的ip ),你可以清楚地连接到http(s)端口,这两个事实结合在一起证明了你的连接工作正常。
https://serverfault.com/questions/838321
复制相似问题