On Windows 10, the built-in firewall (also known as the âMicrosoft Defender Firewallâ or âWindows Firewallâ) is a powerful feature that protects your computer and data from threats from outside trying to get in and from those inside trying to get out.
A firewall works as a gatekeeper and blocks all unnecessary network ports. Every time an app or service tries to communicate outside your device, it checks if thereâs a specific rule in the database to allow or deny network access. Youâll see a prompt to identify and grant or deny permission if it canât find a rule.
Sometimes well-known applications (for example, SQL Server and QuickBooks) will not work as expected because theyâre getting blocked by the Microsoft Defender Firewall. When this happens, youâll need to manually create a rule to allow them to access the network.
This guide will teach you the steps to open a port to allow an app to communicate outside the network using the built-in firewall on Windows 10.
- Open firewall port on Windows 10
- Close firewall port on Windows 10
Important: Before proceeding, check the app support documentation to know the ports and protocol type you need to open. Also, you can quickly confirm if you need to open a port by temporarily disabling the firewall, and if the app works with the firewall disabled, it indicates you need to create a new rule.
Open firewall port on Windows 10
To open one or more ports in the Windows firewall, use these steps:
-
Open Windows Security.
-
Click on Firewall & network protection.
-
Click the Advanced settings option.
-
Select Inbound Rules from the left navigation pane.
-
Under the âActionsâ section, click the New Rule option in the right pane.
-
Select the Port option.
-
Click the Next button.
-
Select the appropriate protocol (TCP or UDP) depending on the application. (Usually, the option is TCP.)
-
In the Specific local ports setting, type the port number.
Quick note: If the app requires multiple ports open, you can type as many as you need as long as you separate each one with a comma (4500,4600,5000). If you need to specify a port range, then you can use a hyphen (-). For example, 3000-3100.
-
Click the Next button.
-
Select the Allow the connection option. (Using the same step, note that you can block the connection.)
-
Click the Next button.
-
Select the network type to apply the rule. (Usually, you want to leave this option with the default selections.)
-
Click the Next button.
-
Type a descriptive name for the ruleâfor example, My Inbound Rule for QuickBooks.
-
Click the Finish button.
After you complete the steps, inbound connections will be allowed for the app through the port you open in the firewall.
Open outgoing port in Microsoft Defender Firewall
If the app needs a specific outbound port, you can use the same instructions, but instead of selecting Inbound Rules on step No. 4, you would choose the Outbound Rules options. Hereâs how:
-
Open Windows Security.
-
Click on Firewall & network protection.
-
Click the Advanced settings option.
-
Click on Outbound Rules in the left navigation pane.
-
Under the âActionsâ section, click the New Rule option in the right pane.
-
Select the Port option.
-
Click the Next button.
-
Select the appropriate protocol (TCP or UDP) depending on the application.
-
In the Specific local ports setting, type the port number.
-
Click the Next button.
-
Select the Allow the connection option.
-
Click the Next button.
-
Select the network type to apply the new rule.
-
Click the Next button.
-
Type a descriptive name for the rule.
-
Click the Finish button.
Once you complete the steps, outbound connections will be allowed for your application through the port you open in the Windows firewall.
Close firewall port on Windows 10
To close the port in the Microsoft Defender Firewall, use these steps:
-
Open Windows Security.
-
Click on Firewall & network protection.
-
Click the Advanced settings option.
-
Click on Inbound Rules or Outbound Rules from the left navigation pane, depending on where you open the firewall port.
-
Select the rule you want.
-
Under the âActionsâ section, click the Disable Rule to close the port while keeping the rule. Or click the Delete Rule option to close the port and remove the rule from the firewall.
After you complete the steps, the app or service will no longer have access to the network or internet because itâll be blocked by the Windows firewall.