我无法通过我的FileZilla客户端连接到我的FileZilla服务器。 当试图连接到同一networking上的本地地址时,我能够成功连接(所以服务器function)。
在这些testing中,FileZilla客户端使用普通FTP进行被动模式。
FileZilla服务器日志
(000042)3/3/2017 1:46:15 AM - (not logged in) (xxx.xxx.xxx.xxx)> Connected on port 2121, sending welcome message... (000042)3/3/2017 1:46:15 AM - (not logged in) (xxx.xxx.xxx.xxx)> 220-FileZilla Server 0.9.60 beta (000042)3/3/2017 1:46:15 AM - (not logged in) (xxx.xxx.xxx.xxx)> 220-written by Tim Kosse ([email protected]) (000042)3/3/2017 1:46:15 AM - (not logged in) (xxx.xxx.xxx.xxx)> 220 Please visit https://filezilla-project.org/ (000042)3/3/2017 1:46:15 AM - (not logged in) (xxx.xxx.xxx.xxx)> USER admin (000042)3/3/2017 1:46:15 AM - (not logged in) (xxx.xxx.xxx.xxx)> 331 Password required for admin (000042)3/3/2017 1:46:15 AM - (not logged in) (xxx.xxx.xxx.xxx)> PASS ******** (000042)3/3/2017 1:46:15 AM - admin (xxx.xxx.xxx.xxx)> 230 Logged on (000042)3/3/2017 1:46:15 AM - admin (xxx.xxx.xxx.xxx)> PWD (000042)3/3/2017 1:46:15 AM - admin (xxx.xxx.xxx.xxx)> 257 "/" is current directory. (000042)3/3/2017 1:46:15 AM - admin (xxx.xxx.xxx.xxx)> TYPE I (000042)3/3/2017 1:46:15 AM - admin (xxx.xxx.xxx.xxx)> 200 Type set to I (000042)3/3/2017 1:46:16 AM - admin (xxx.xxx.xxx.xxx)> PASV (000042)3/3/2017 1:46:16 AM - admin (xxx.xxx.xxx.xxx)> 227 Entering Passive Mode (172,16,1,9,27,5) (000042)3/3/2017 1:46:16 AM - admin (xxx.xxx.xxx.xxx)> MLSD (000042)3/3/2017 1:46:26 AM - admin (xxx.xxx.xxx.xxx)> 425 Can't open data connection for transfer of "/"
FileZilla客户端日志
Status: Connection established, waiting for welcome message... Status: Logged in Status: Retrieving directory listing... Status: Directory listing of "/" successful Status: Disconnected from server Status: Resolving address of www.example.com Status: Connecting to yyy.yyy.yyy.yyy:2121... Status: Connection established, waiting for welcome message... Status: Logged in Status: Retrieving directory listing... Status: Server sent passive reply with unroutable address. Using server address instead. Command: MLSD Response: 425 Can't open data connection for transfer of "/" Error: Failed to retrieve directory listing
您很可能没有打开服务器防火墙上的数据连接端口(或者没有转发NAT上的端口,如果有的话)。
检查FTP服务器正在使用的端口,并打开/转发它们。
另一个问题是,您没有在FTP服务器中configuration正确的外部IP地址。
FileZilla客户端可以解决这个问题:
服务器发送具有不可路由地址的被动回复。 改用服务器地址。
但这只是一个启发式的,并不是所有的FTP客户端都会这样做。 所以请确保你也解决了这个问题,即使这不是你有的问题。
在上面的屏幕截图中查看被动模式传输的外部服务器IP地址部分。
有关背景信息,请参阅我的关于FTPnetworkingconfiguration的文章。