How To Open a Port in Windows Firewall
In the following tutorial, you will learn how to open a port in Windows Firewall. You can use this guide to open a port in Windows 11/10 or Windows Server.
To show how it works, we will create a Firewall rule that opens TCP port 80.
Open the Firewall: click the start button and type Firewall, and then choose Windows Defender Firewall with Advanced Security from the search result.
You will see a window like the following:
To open a port, go and right-click on Inbound Rules in the left pane and then click New Rule in the menu that appears.
The New Inbound Rule Wizard appears. Select Port as the type of rule you want to create.
In the next window, choose the protocol and then type the port number in the Specific local ports text box. After that, click Next.
On the Action screen, select Allow the connection and then click Next.
In the Profile screen, select the network profile (Domain, Private, and Public).
Finally, give a name to the rule and click Finish.
In the Inbound Rules section of the Windows Firewall, you will see all of the existing inbound rules, including the one you created to open a port.
To disable a Firewall Rule, right-click and choose Disable Rule.
Open Multiple Ports
To open multiple ports at once, separate the numbers by using commas.
To open a range of ports (from 10000 to 10100 ) at once, use the following format:
Only Allow Connections From Specific IP Addresses
You could modify firewall rules to allow users from specific IP addresses.
To do this, double-click the rule to open Properties and then go to the Scope tab.
Under the Local IP address section, switch to the These IP addresses radio button and click on the Add button.
A window appears, in which you can specify the IP Address you want to allow. Click the Add button again to add another IP address or subnet.