我正在尝试在我的服务器上设置 vsftpd,它可以工作、运行和连接。但是当我尝试使用 FileZilla 连接到服务器时,我收到以下错误:
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/var/www/html"
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: PASV
Response: 227 Entering Passive Mode (193,23,181,154,235,226).
Command: LIST
Error: The data connection could not be established: ETIMEDOUT - Connection
attempt timed out
我已经设置了端口并将它们转发到防火墙:
vsftpd.conf:
connect_from_port_20 = YES
pasv_enable = YES
pasv_addr_resolve = NO
pasv_address = 193.23.181.154
pasv_min_port = 4242
pasv_max_port = 4243
port_enable = YES
我做错了什么/我需要添加什么?
答案1
您的 vsftpd 配置未应用。也许您在更改配置后没有重新启动服务器?
Response: 227 Entering Passive Mode (193,23,181,154,235,226).
这意味着服务器正在监听端口 60386 (235 << 8 + 226)。即不在 4242-4243 范围内的端口上。