Ubuntu 随机拒绝主机

Ubuntu 随机拒绝主机

目前我面临一个非常奇怪的问题:我的 Ubuntu 正在随机重置连接,但我不知道为什么。

/etc/hosts.deny 是空的(即仅带有注释的默认文件,由 ubuntu 自带)

我已经从系统中清除了 ufw,并且将 IPtables 设置为接受所有内容:

root@Template-Ubuntu-12:~# iptables -L -v
Chain INPUT (policy ACCEPT 43 packets, 6118 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 16 packets, 1520 bytes)
 pkts bytes target     prot opt in     out     source               destination

这是我当前的版本:

root@Template-Ubuntu-12:~# uname -a
Linux Template-Ubuntu-12 3.13.0-27-generic #50~precise1-Ubuntu SMP Fri May 16 20:47:56 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

这里有一个例子 - 当我在 ssh 会话中输入一些内容时突然断开了连接:

tzhwiman@Template-Ubuntu-12:~$ u[LOCAL] : Stream has closed [CLOSE_TYPE_NONSPECIFIC] : Connection was reset. 
[LOCAL] : Changing state from STATE_CONNECTION to STATE_CLOSED 
[LOCAL] : Discarding invalid state change from STATE_CLOSED to STATE_ALMOST_CLOSED. 
[LOCAL] : Connected for 331 seconds, 1819 bytes sent, 3713 bytes received 

Connection was reset.

此外,我无法在随机时间内重新连接。但是:我可以从其他来源登录,没有任何问题。

我还发现,如果我从另一个主机/源登录,然后 ping 当前被阻止的主机,我可以恢复连接(请注意,当主机被阻止时,前几个 ping 总会丢失):

PING X.X.126.19 (X.X.126.19) 56(84) bytes of data.
64 bytes from X.X.126.19: icmp_req=2 ttl=128 time=0.526 ms
64 bytes from X.X.126.19: icmp_req=3 ttl=128 time=0.499 ms
64 bytes from X.X.126.19: icmp_req=4 ttl=128 time=0.459 ms
^C
--- X.X.126.19 ping statistics ---
4 packets transmitted, 3 received, 25% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.459/0.494/0.526/0.037 ms

奇怪的是,被阻止的主机(到 ubuntu)的 ping(icmp)始终有效,但我无法连接到 ssh(端口 22)或 Web 服务器(端口 80)。我分析了流量,对于每个 tcp SYN,我都会立即获得一个 tcp RST。

我可以在哪里检查/调试更多内容?我已经查看了 /var/log/syslog auth.log kern.log,但没有发现任何可疑内容

相关内容