How to Open specific sequence of port numbers when firewall is on

By default the Windows Firewall seems to block all ports.  In order to open ports 2400-2600 you can run the following command from a Command Prompt:

FOR /L %I IN (2400,1,2600) DO netsh firewall add portopening TCP %I "Port"%I

This command will basically add each port, starting with port 2400, in increments of 1, up to port 2600 to the Exceptions list.

To remove these ports from the Exceptions list, you can run the following port from a Command Prompt:

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

How to enable remote desktop when firewall is on:From Windows Firewall in Control Panel select the Advanced tab and then click on the Settings button next to the “Local Area Connection” and check the box next to “Remote Desktop”.

References:

link1
link2

0 comments: (+add yours?)

Post a Comment

Related Posts with Thumbnails