Windows 2008 R2 上的防火墙阻止 FTP 服务器

And*_*erd 10 iis firewall ftp

我可以从本地机器访问 FTP 站点而没有问题,但是从远程机器超时。

如果我完全关闭防火墙,它就可以工作。显然,这并不是一个真正令人满意的解决方案。

我试图按照这些步骤操作,但现在有用。

在我的远程机器上,我使用 Filezilla 作为 FTP 客户端。以下是我尝试访问该站点时它给我的输出。如您所见,它设法连接和验证,但尝试列出目录超时。

有人可以告诉我接下来应该看哪里吗?

Status: Connecting to 192.168.15.12:21...
Status: Connection established, waiting for welcome message...
Response:   220 Microsoft FTP Service
Command:    USER CMSDEVELOPMENT\CMSdev
Response:   331 Password required for CMSDEVELOPMENT\CMSdev.
Command:    PASS ******
Response:   230-Directory has 71,805,415,424 bytes of disk space available.
Response:   230 User logged in.
Command:    OPTS UTF8 ON
Response:   200 OPTS UTF8 command successful - UTF8 encoding now ON.
Status: Connected
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/" is current directory.
Command:    TYPE I
Response:   200 Type set to I.
Command:    PASV
Response:   227 Entering Passive Mode (192,168,15,12,192,160).
Command:    LIST
Response:   150 Opening BINARY mode data connection.
Error:  Connection timed out
Error:  Failed to retrieve directory listing
Run Code Online (Sandbox Code Playgroud)

查看防火墙日志,我看到以下条目:

2012-04-23 14:44:54 DROP TCP 192.168.15.90 192.168.15.12 55743 49342 52 S 650301735 0 65535 - - - RECEIVE
2012-04-23 14:44:57 DROP TCP 192.168.15.90 192.168.15.12 55743 49342 52 S 650301735 0 65535 - - - RECEIVE
2012-04-23 14:45:03 DROP TCP 192.168.15.90 192.168.15.12 55743 49342 48 S 650301735 0 65535 - - - RECEIVE
Run Code Online (Sandbox Code Playgroud)

And*_*erd 25

我终于让它工作了,但我学到了一些东西:

  • IIS 将允许您配置 FTP 服务器将用于被动模式的端口。但是,对我来说,直到我重新启动名为“Microsoft FTP Service”的服务后,这才生效

  • 当我查看入站防火墙规则时,我看到了三个预先配置的规则:

    • FTP 服务器(FTP 流量输入)
    • FTP 服务器被动(FTP Passive Traffic-in)
    • FTP 服务器安全(FTP SSL 流量输入)

这些规则看起来正是我所需要的。但出于某种原因,他们实际上并没有做任何事情。当我创建自己的规则并指定完全相同的内容时,它起作用了。(显然,我不是第一个遇到此问题的人,请参阅此帖子。)


稍后编辑:阅读下面的评论,看来我误会了这些规则不起作用。您只需要启用它们并重新启动 Microsoft FTP 服务

  • 感谢 Andrew 提供的“Microsoft FTP 服务”重启提示!:D 这为我做了。 (9认同)
  • 重新启动“Microsoft FTP 服务”也为我修复了它(在 2012 R2 上)。我有那些预先配置的规则,但由于某种原因它们没有生效。 (3认同)