Proftpd 端口转发失败

Proftpd 端口转发失败

我正在运行 Ubuntu 10.04 的 ec2 实例上设置 proftpd

我浏览了所有论坛并尝试了所有建议,但似乎仍然无法正常工作。我知道问题出在被动端口上,但我尝试过的所有方法都失败了。

filezilla 日志显示:

Status: Resolving address of ec2-50-110-20-81.us-west-2.compute.amazonaws.com
Status: Connecting to 50.110.20.81:21...
Status: Connection established, waiting for welcome message...
Response:   220 ProFTPD 1.3.2c Server (Michaels Main) [50.110.20.81]
Command:    USER cube
Response:   331 Password required for cube
Command:    PASS *******
Response:   230 User cube logged in
Command:    OPTS UTF8 ON
Response:   200 UTF8 set to on
Status: Connected
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/home/cube" is the current directory
Command:    TYPE I
Response:   200 Type set to I
Command:    PASV
Error:  Disconnected from server: ECONNABORTED - Connection aborted
Error:  Failed to retrieve directory listing

在我的 proftpd.conf 文件中,我有以下几行用于设置被动端口:

ServerType                      inetd
PassivePorts                    60000 60200
MasqueradeAddress               51.110.20.81

我的 iptables -L -v 如下所示:

4475 370K ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
   0    0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:ftp-data
  13  676 ACCEPT tcp -- any any anywhere anywhere tcp dpt:ftp
   1   40 ACCEPT tcp -- any any anywhere anywhere tcp dpts:60000:60200
   0    0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:ssh

netstat --vatn:

tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 10.252.45.220:22        214.11.175.64:18169     ESTABLISHED
tcp6       0      0 :::22                   :::*                    LISTEN

/proc/sys/net/ipv4/ip_forward 设置为 1。

我已取消注释 /etc/sysctl.conf 中的 net.ipv4.ip_forward=1 行

这让我头疼,有什么想法吗?如果我遗漏了什么,请告诉我。

谢谢您的帮助,加油!

答案1

您是否在 EC2 安全组中打开了端口 60000 至 60200?

相关内容