netsh adding allowed tcp port to win7 firewall

Object: Windows 7 64bit sp1 with all current updates as of (see post date)

Found the internet articles how to add ports, but they were useless. Even official kb. Seems some update changed behavior of netsh.

So, I wanted to add an mstsc port to be open in all profiles in firewall:

netsh advfirewall firewall add rule name=mstsc3389 dir=in profile=any localport=3389 protocol=tcp action=allow

Remember to do that from elevated cmd if UAC is enabled.

Update: It also works with win8pro

This entry was posted in windows. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *