Iis – Passive ftp on Server 2008

ftpiispassivewindows-server-2008

I have a new Windows 2008 server with IIS7. When I connect to the ftp in active mode, it works fine. In passive mode, it connects, but then times out trying to get the directory listing. I tried disabling both firewalls, but it didn't help. I've tried this with difference client machines and different ftp client software, with no change. Any ideas?

Best Answer

In the command prompt of the server, enter these two commands to open the firewall:

First command:

netsh advfirewall firewall add rule name="FTP (non-SSL)" action=allow protocol=TCP dir=in localport=21

Second command:

netsh advfirewall set global StatefulFtp enable

In Amazon EC2, you also have to set up a security group to open the passive ports, such as 1025 to 7000.