【发布时间】:2014-07-19 09:24:05
【问题描述】:
我有一个问题,我一直在尝试解决,但无法弄清楚发生了什么。我有各种网络服务器,它们都安装了 apache。他们都在同一个网络上,但其中一个给我带来了问题。
我有服务器(.44、.45 和 .46)
我可以 ssh 进入 .44 并 ping .45 和 .46 没有问题。但是,当我尝试测试并查看端口 80 是否打开时,.45 会给我这个消息。
someadminuser@somelocation:/var/www$ telnet 10.0.0.45 80
Trying 10.0.0.45...
telnet: Unable to connect to remote host: Connection refused
这是 .46 上的相同测试
someadminuser@somelocation:/var/www$ telnet 10.0.0.46 80
Trying 10.0.0.46...
Connected to 10.0.0.46.
Escape character is '^]'.
所以我 ssh 进入 .45 以查看端口。
someadminuser@somelocation:~$ netstat -tulpn | grep :80
(No info could be read for "-p": geteuid()=1000 but you should be root.)
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
someadminuser@somelocation:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:httpflags:
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:http
任何帮助将不胜感激。
****************更新****************
我保存了我的 ipv4 表,这就是我得到的:
# Generated by iptables-save v1.4.12 on Thu May 29 14:05:31 2014
*nat
:PREROUTING ACCEPT [3416:231940]
:INPUT ACCEPT [1175:75880]
:OUTPUT ACCEPT [337:25196]
:POSTROUTING ACCEPT [337:25196]
-A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3000
-A OUTPUT -d 127.0.0.1/32 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3000
当然,还有更多内容,但这部分看起来很可疑。
【问题讨论】: