FileZilla FTP的被动模式不起作用

我们有Windows服务器2008 R2上运行的FileZilla服务器0.9.37

主动模式工作正常,服务器上的Windows防火墙已closures。

我们的路由器是一个DrayTek vigor 2820.在NAT,打开端口,我已经打开了以下端口的服务器本地IP

TCP 20-22,TCP 45100-65535

在FileZilla服务器,在被动模式设置(我不能发布图像,所以…)

Use the following IP: 213.106.150.123 Don't use external IP from local connections: Checked Use custom port range: 45100-65535 

从我在RDP的德国远程服务器上,我尝试连接到FileZilla服务器。

 Status: Connecting to 213.106.150.123:21... Status: Connection established, waiting for welcome message... Response: 220 -- Command: USER ftp_001471 Response: 331 Password required for ftp_001471 Command: PASS ******** Response: 230 Logged on Status: Connected Status: Retrieving directory listing... Command: CWD / Response: 250 CWD successful. "/" is current directory. Command: TYPE I Response: 200 Type set to I Command: PASV Response: 227 Entering Passive Mode (213,106,150,123,238,133) Command: MLSD Response: 425 Can't open data connection. Error: Failed to retrieve directory listing 

FileZilla服务器上的状态窗口报告如下

 (not logged in) (87.106.131.22)> Connected, sending welcome message... (not logged in) (87.106.131.22)> 220 -- (not logged in) (87.106.131.22)> USER ftp_001471 (not logged in) (87.106.131.22)> 331 Password required for ftp_001471 (not logged in) (87.106.131.22)> PASS ******** ftp_001471 (87.106.131.22)> 230 Logged on ftp_001471 (87.106.131.22)> CWD / ftp_001471 (87.106.131.22)> 250 CWD successful. "/" is current directory. ftp_001471 (87.106.131.22)> TYPE I ftp_001471 (87.106.131.22)> 200 Type set to I ftp_001471 (87.106.131.22)> PASV ftp_001471 (87.106.131.22)> 227 Entering Passive Mode (213,106,150,123,195,197) ftp_001471 (87.106.131.22)> MLSD ftp_001471 (87.106.131.22)> 425 Can't open data connection. 

如果我将FileZilla被动模式设置从外部IP更改为默认,我会从德国的客户端获得以下详细信息。

 Status: Connecting to 213.106.150.123:21... Status: Connection established, waiting for welcome message... Response: 220 -- Command: USER ftp_001471 Response: 331 Password required for ftp_001471 Command: PASS ******** Response: 230 Logged on Status: Connected Status: Retrieving directory listing... Command: CWD / Response: 250 CWD successful. "/" is current directory. Command: TYPE I Response: 200 Type set to I Command: PASV Response: 227 Entering Passive Mode (213,106,150,123,196,198) Command: MLSD Response: 425 Can't open data connection. Error: Failed to retrieve directory listing 

和服务器上的细节。

 (not logged in) (87.106.131.22)> Connected, sending welcome message... (not logged in) (87.106.131.22)> 220 -- (not logged in) (87.106.131.22)> USER ftp_001471 (not logged in) (87.106.131.22)> 331 Password required for ftp_001471 (not logged in) (87.106.131.22)> PASS ******** ftp_001471 (87.106.131.22)> 230 Logged on ftp_001471 (87.106.131.22)> CWD / ftp_001471 (87.106.131.22)> 250 CWD successful. "/" is current directory. ftp_001471 (87.106.131.22)> TYPE I ftp_001471 (87.106.131.22)> 200 Type set to I ftp_001471 (87.106.131.22)> PASV ftp_001471 (87.106.131.22)> 227 Entering Passive Mode (192,168,1,4,195,198) ftp_001471 (87.106.131.22)> MLSD ftp_001471 (87.106.131.22)> 425 Can't open data connection. 

我究竟做错了什么?

当我指定外部IP的客户端和服务器报告相同,但端口被搞砸了,当我用默认运行服务器使用其内部的IP,但端口分配看起来更好。

编辑:更多的testing和它的工作。

所以我安装了FTP服务器在IIS 7.5中,禁用FileZilla,它的工作! 然后,我尝试重新启用FileZilla,也工作! 这是从我家的ADSL连接。

然后,我再次尝试从我们在德国的远程服务器,它失败了,挂起在IIS FTP和FileZilla被动模式的目录列表。

我想德国数据中心的防火墙/路由器有一些问题。 我真的不想弄乱远程服务器路由器(我甚至不知道是否可以修改防火墙规则,因为它的托pipe)我担心企业客户尝试访问我们的FTP站点时遭受同样的命运。

我build议你尝试使用Windows的FTP或其他安装的客户端在本地服务器上。 这样你会看到是networking/防火墙问题还是FTP服务器的configuration问题。 如果命令还检查Filezilla服务器的日志文件。

如果取决于防火墙,则可以参阅以下TechNet文章: 如何为被动模式FTP服务器configurationWindows防火墙 。 但是你写道,Windows防火墙是closures的,所以我想这是外部防火墙/路由器的问题(也检查客户端)。

我有一个类似的问题,并通过在Filezila服务器设置中的“被动模式传输的外部服务器IP地址”选项中select“default”来解决它。 换句话说,即使你在一个私人地址,也不要在这里input你的公共IP地址。 原因是你的防火墙可能启用了“FTP检查”,并且会将你的服务器私有IP地址转换为你的公共IP地址。 在这种情况下,在Filezila中启用此翻译将会导致问题,并且在您的客户端发出PASV命令后连接将会丢失。

我意识到这可能是一个改变,但在2008年新的FTP服务器是非常强大的,我最终取代了FileZilla自己。 你也可以考虑一下。