milka.dk
milka.dk
IIS7: Open A Range Of Ftp Passive Mode Ports Using Netsh
16. sep 2010
If you need passive mode ports for your IIS Ftp Server, it can be a real pain to do that, as Microsoft in their infinite wisdom didn’t add an option to add port ranges, but only single ports.
Luckily you can add many single ports with netsh in one batch. Here’s an example on how to do that:
for /L %i in (49900,1,49910) do netsh firewall add portopening TCP %i "Secure
FTP Server Passive Port:> %i"
Just replace 49000 to 49910 with the port range you need. Also replace the text “Secure FTP Server Passive Port:” with your own.
Note: Remember to run this in an elevated command prompt.
This might work on Vista and Windows 7 as well.