4) On the right, under Actions, click the ‘New Rule’ link. Windows Firewall shows you the New Inbound Rule Wizard.

5) Select the option marked ‘Port’ and click ‘Next’.

6) Choose TCP or UDP. Unlike most routers, you will need to choose between TCP or UDP to create the rule.

Enter in the port range. Make sure the “Specific local ports” option is selected, and then type the ports you need to open into the field. You can open multiple individual ports by separating them with a comma, and you can denote a range of ports by using a dash between the two ends of the range. Click Next to continue.

7) Select ‘Allow the connection’ in the next window and hit ‘Next’.

8) Select the network type as you see fit and click Next.

9) Name the rule something meaningful and click Finish.

You have now opened a firewall port in Windows and you can use these same steps to block programs or ports too.