解决FTP通信不通过

我最近设置了vsftpd,虽然一切似乎运行良好,服务器正在侦听正确的端口,我不能使用FTP客户端连接。

连接build立,但在等待欢迎消息时,它超时。

谷歌search的问题导致大量的网页说我应该检查我的iptables,我对这些知之甚less,但是我已经打印了下面的结果。

我的第一个问题是我猜iptables的行为就像一个软件防火墙,大概如果我没有设置,那么所有的stream量应该会好吗?

我的第二个问题是,iptables是最常见的,但不仅限于什么stream量可以进来,如果不是唯一的,还有其他地方我应该看?

请请求任何额外的信息,我会适当地编辑问题。

编辑

我检查了任何相关的日志,找不到任何注释。

当我尝试命令ftp localhost我得到一个超时,所以它看起来可能与IPTables没有任何关系,但我不知道完全排除。

运行telnet localhost ftptelnet localhost ftp-data是超时,但他们确实尝试连接到127.0.0.1,这是我所期望的。

这里是我的IP表;

 Chain INPUT (policy DROP) target prot opt source destination fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh ACCEPT tcp -- anywhere anywhere multiport dports ssh,smtp,domain,www,https,ssmtp,xmpp-client,xmpp-server,5280,8999:9003 ACCEPT udp -- anywhere anywhere multiport dports domain ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere multiport dports http-alt ACCEPT tcp -- anywhere anywhere tcp dpt:ftp state NEW ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED Chain FORWARD (policy DROP) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED Chain fail2ban-ssh (1 references) target prot opt source destination RETURN all -- anywhere anywhere 

“但他们确实尝试连接到127.0.0.1这是我所期望的”

如果这意味着它在尝试127.0.0.1时也失败了,那么您可以从validation服务器实际上正在运行作为起点开始。

尝试在您的FTP客户端切换到被动模式。

这通常可以帮助指出在防火墙/路由器上是否存在限制。