How to open range of ports on Windows XP / 2003 Firewall

Manually opening range of port can be very painful if you must open a big range of ports. It can be easily done with the following script from command prompt:

FOR /L %I IN (5000,1,5010) DO netsh firewall add portopening TCP %I “Passive FTP”%I

This will open ports from 5000 to 5010.

FOR /L %I IN (5000,1,5010) DO netsh firewall delete portopening TCP %I

Thiss will close ports from 5000 to 5010.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: