To add a range of ports to Windows Firewall from the Command Line:
- Click Start, click Run, type cmd, and then click OK.
- Type in the following where the range is specified in brackets and the name you choose for the firewall entry is in double quotes.
FOR /L %I IN (5001,1,5201) DO netsh firewall add portopening TCP %I "Passive FTP"%I - Each port in the range will be added with an "OK" confirmation.
Comments