最近一次重启之后,我的服务器无法通过http连接,但并不是所有的时间。
我有一个80端口的接受规则,这里是我的iptables:
Chain INPUT (policy ACCEPT) target prot opt source destination RH-Firewall-1-INPUT all -- anywhere anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination RH-Firewall-1-INPUT all -- anywhere anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain RH-Firewall-1-INPUT (2 references) target prot opt source destination ACCEPT all -- anywhere anywhere ACCEPT icmp -- anywhere anywhere icmp any ACCEPT esp -- anywhere anywhere ACCEPT ah -- anywhere anywhere ACCEPT udp -- anywhere anywhere udp dpt:ipp ACCEPT tcp -- anywhere anywhere tcp dpt:ipp ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:smtp ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
我不能通过cURL连接,但traceroute似乎工作得很好。
$ curl www.google.com curl: (7) couldn't connect to host traceroute to www.google.com (74.125.20.104), 30 hops max, 40 byte packets 1 pe-in-f104.1e100.net (74.125.20.104) 0.042 ms 0.020 ms 0.019 ms
服务器发送很多传出的http请求,其中一些正在通过,而另一些则失败。
我真的不知道还有什么地方要找这个。 任何帮助,将不胜感激。
编辑:我重新启动iptables服务和问题消失了,但也是关于大量的http作业完成的时间。 我试图再次运行的工作,但我没有看到问题再次发生。 如果我再次看到问题,我将切换到wget而不是cURL。
询问您的托pipe服务提供商/ ISP是否已经对其进行过滤。 也许有人试图在80端口打你的服务器硬盘。其他的想法是:检查路由和你的DNSparsing器configuration。
在这台服务器和另一台机器之间进行一些testing。 在两台机器上用tcpdump检查端口80。 使用tcpdump,即使您的计算机的防火墙丢弃了stream量,也应该看到stream量传入/传出。