简体   繁体   English

如何为带有IIS的Amazon EC2服务器启用FTP被动模式

[英]How to enable FTP Passive Mode for Amazon EC2 server with IIS

I originally had the issue when using pagelime which required users to use passive mode and did not support active mode. 我在使用pagelime时遇到了问题,这需要用户使用被动模式并且不支持主动模式。 Getting active mode to work was pretty straight forward but getting passive to work took a lot more effort. 让主动模式工作非常简单,但是被动工作需要付出更多努力。

I am using a Amazon EC2 server with IIS as well as a FTP Site. 我正在使用带有IIS的Amazon EC2服务器以及FTP站点。

The following link is what finally solved it for me. 以下链接最终为我解决了这个问题。 I will highlight some of the main things below in case the link stops working. 如果链接停止工作,我将重点介绍下面的一些主要内容。

https://forums.aws.amazon.com/thread.jspa?threadID=98905 https://forums.aws.amazon.com/thread.jspa?threadID=98905

  1. In IIS, highlight the top-level server (not the FTP site). 在IIS中,突出显示顶级服务器(而不是FTP站点)。 Click FTP Firewall Support. 单击FTP防火墙支持。 Under Data Channel Port Range, set a small range, eg 41000-41099. 在数据通道端口范围下,设置一个小范围,例如41000-41099。 Under External IP Address to your Elastic IP Address. 在弹性IP地址的外部IP地址下。 Enabling 49152-65535 will work as well but is probably less secure due to the greater number of ports opened. 启用49152-65535也可以正常工作,但由于打开的端口数量较多,可能安全性较低。

在此输入图像描述在此输入图像描述在此输入图像描述

  1. Open the Windows firewall for the ftpsvc. 打开ftpsvc的Windows防火墙。 Disable the StatefulFtp global setting: 禁用StatefulFtp全局设置:

netsh advfirewall firewall add rule name=FTP_Service action=allow service=ftpsvc protocol=TCP dir=in

netsh advfirewall set global StatefulFTP disable

在此输入图像描述

  1. From an administrative command prompt, restart the Microsoft FTP Service to make sure all the changes take effect: 从管理命令提示符,重新启动Microsoft FTP服务以确保所有更改生效:

net stop ftpsvc

net start ftpsvc

  1. Open the corresponding 100 ports, eg 21 and 41000-41099, in your EC2 Security Group. 在EC2安全组中打开相应的100个端口,例如21和41000-41099。 Or 49152-65535 if you go that route. 或者49152-65535如果你走那条路。 在此输入图像描述在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM