How to Block or Open a Port in Windows Firewall

According to your needs, you can configure Windows Firewall settings (block or open port in Windows 10/8/7l) and restore defaults if you are unsatisfied with the default Windows Firewall settings. However for this, you need to get to the advanced settings of firewall. This is simple, simply open up the control panel and in its search box type – Firewall. Then open Firewall and click on its ‘Advanced Settings’ link.

We have already see how to manage Windows firewall. In this post we will see in detail how to block or open a port in Windows 10/87 firewall.

Block port in Windows Firewall

When in the ‘Advanced Settings’ of Windows 8 firewall, click the Advanced settings link in the left-hand pane on the firewall main dialog. This will bring up the Windows Firewall with Advanced Security window.

Windows Firewall advanced settings

Now, if you see the firewall window shows a list of rules in the left side. From the list, select Inbound Rules to display the inbound rules section.

inbound rules

Then, from the right-pane select the ‘New Rule’ option.

Windows Firewall new rule

Doing so will open the ‘New Inbound Rule Wizard’ window.

From it, select ‘Port’ as the new Rule Type and click Next. For safety purposes, I tried blocking TCP port. Click on Specific local ports. Then choose one port like 80 as shown in the screenshot below.

Windows Firewall select ort

Click Next to continue.

Windows Firewall block connection

Next, select ‘Block the connection’ as the Action and click Next.

Windows Firewall block connection blocked

Later, select all the profiles available for different type of connections (Domain, Private and Public) and Click Next to continue.


Give a name of your choice to the new rule. I used ‘block suspicious ports’. If you want, you can add description to the new rule. This step is however optional.

block suspicious ports

Finally, click the Finish button to configure the settings.

Open port in Windows Firewall

At times, you may you may feel the need of opening a port in the Windows firewall to let a specific IP communicate with your computer. For example, while playing games. The procedure to open a port remains more or less the same. All you need to do is follow the instructions in the New Inbound Rule wizard, specify the Port and select Allow the connection.

That’s it!

Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.