连接到EC2 Windows 2012实例时不会呈现目录列表

我创build了一个Amazon EC2 Windows 2012实例。 我通过IIS安装FTP,并确保亚马逊防火墙和实例的防火墙都允许端口21的stream量。当我从我的Filezilla FTP客户端连接到实例时,连接被接受,但是目录列表不被渲染。

以下是使用Filezilla进行连接时的输出:

Response: 501 Server cannot accept argument. Command: PASV Response: 227 Entering Passive Mode (204,236,224,103,192,56). Command: LIST Response: 150 Opening BINARY mode data connection. Error: The data connection could not be established: ETIMEDOUT - Connection attempt timed out Error: Connection timed out Error: Failed to retrieve directory listing 

当通过RDP连接到服务器时,我打开IE并inputftp://localhost并且可以无问题地连接。 在我的本地浏览器中,当我inputftp://ElasticIP我无法连接。 请注意,我在IIS中设置了FTP服务器,绑定到所有未分配端口号的IP地址。FTP防火墙支持还input了弹性IP。

必须采取哪些额外步骤才能确保FTP正常工作? 非常感谢您的帮助和指导。

从这个链接: https : //forums.aws.amazon.com/thread.jspa?messageID=361644&tstart=0#

“IIS FTP使用活动模式,而EC2仅支持被动模式FTP连接,因为实例具有私人和公共IP地址。

唯一的解决方法是:

  1. 请确保在公共configuration文件中禁用了Windows防火墙。

  2. 在安全组(EC2):TCP 49152-65535上打开此端口范围

  3. 确保您在此实例上使用弹性IP地址(EIP)。

  4. 将此EIP添加为FTP防火墙configuration中的外部IP地址。 http://learn.iis.net/page.aspx/309/configuring-ftp-firewall-settings-in-iis-7/请参阅上述“步骤2:configuration特定FTP站点的外部IPv4地址”页。

我在Windows Server 2008 R2(IIS 7.5)上testing了这一点。 如果您按照这些步骤,您的IIS FTP应configuration为使用与EC2一起使用的被动模式FTP“。

这样做对我们有效。