我很难通过我的FileZilla客户端连接到我的FileZilla服务器。在同一网络上尝试连接到本地地址时,我可以成功地连接(因此服务器是可以运行的)。
在这些测试期间,FileZilla客户端正在使用带有纯FTP的被动模式。
(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 (tim.kosse@filezilla-project.org)
(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 "/"
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
发布于 2017-03-03 08:32:17
您很可能没有在服务器的防火墙上打开数据连接端口(或者没有转发NAT上的端口,如果有的话)。
检查FTP服务器正在使用哪些端口,并打开/转发它们。
另一个问题是,您没有在FTP服务器中配置正确的外部IP地址。
FileZilla客户端可以解决这个问题:
服务器发送带有不可路由地址的被动回复。使用服务器地址代替。
但这只是一种启发,并不是所有FTP客户端都能做到。所以,确保你也解决了这个问题,即使这不是你面临的直接问题。
请参阅上述屏幕截图中的外部服务器IP地址被动模式传输部分。
有关背景,请参阅我在FTP的网络配置上的文章。
发布于 2021-02-08 04:09:18
下面的答案来自filezilla wiki:
https://wiki.filezilla-project.org/Setting_向上_你的_路由器_至_修复_这个_%22425_代码%22
总结3个步骤:
详情如下:
(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 "/"
根据第3行的日志混乱
进入被动模式(172,16,1,9,27,5)
在通道模式中使用的端口是27*256+5 = 6917
步骤1,安装Filezilla服务器被动模式:
从设置 >被动模式设置可以看到此设置
就我来说是6000-6100
步骤2,路由器端口转发设置:由于您正在将公共IP路由到该服务器,因此您需要根据该端口范围在路由器上创建一个端口转发条目:
第3步,windows防火墙:下一步,检查windows防火墙是否有允许来自filezilla程序的通信的规则,如果没有,则创建一个。
https://serverfault.com/questions/836032
复制相似问题