Network access control

How to open a port in the firewall on Windows 10

If you have an app getting blocked by the firewall, here are the steps to create a rule to allow the app network access through an specific port.

Opening a firewall port on Windows 10

On Windows 10, the built-in firewall is a powerful feature that has been designed to protect your device and data from different threats from outside trying to get in as well as threats from inside trying to get out.

A firewall basically works as a gatekeeper and blocks all unnecessary network ports, and 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. If it can’t find a rule, a prompt will appear to identify and grant or deny permission.

Sometimes applications you know well (such as SQL Server and QuickBooks) will not work properly because they’re getting blocked by the firewall, when this happens you’ll need to create a rule to allow them access to the network manually.

In this guide, you’ll learn the steps to open a port to allow an app to communicate outside of the network using the built-in firewall on Windows 10.

How to open a port using the Windows 10’s firewall

If you’re using the Windows 10’s firewall an app requires one or more ports open in order to operate, then use these steps:

Important: You must first check your app support documentation to know the ports and protocol type that you need to open. Also, before proceeding, you can quickly check if you need to open a port by temporarily disabling the firewall, and if the app works with the firewall disabled, then you must open the port.
  1. Open Windows Defender Security Center.

  2. Click on Firewall & network protection.

  3. Click the Advanced settings link.

    Windows Defender firewall settings
    Windows Defender firewall settings
  4. Select Inbound Rules from the left pane.

  5. Under “Actions,” from the right pane, click the New Rule option.

    Windows Defender firewall Inbound rules
    Windows Defender firewall Inbound rules
  6. Select the Port option.

    Firewall open inbound port option
    Firewall open inbound port option
  7. Click the Next button.

  8. Select the appropriate protocol (TCP or UDP) depending on the application. (Usually, the option is TCP.)

  9. In the Specific local ports field, type the port number.

    Open specific firewall port using TCP or UDP protocol
    Open specific firewall port using TCP or UDP protocol
    Info: If the application 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). In the case that you need to specify a port range, then you can use a hyphen (-). For example, 3000-3100.
  10. Click the Next button.

  11. Select the Allow the connection option. (Using the same step, note that you can also block connection.)

    Allow connection settings
    Allow connection settings
  12. Click the Next button.

  13. Select the network type the new rule should apply to. (Usually, you want to leave this option with the default selections.)

    Firewall network profile settings
    Firewall network profile settings
  14. Click the Next button.

  15. Type a descriptive name for the rule. For example, My Inbound Rule for QuickBooks.

    Firewall open port rule name settings
    Firewall open port rule name settings
  16. Click the Finish button.

After completing the steps, inbound connections will be allowed for your application through the port you open in the firewall.

Opening an outgoing port

In the case that your application needs a specific outbound port to be opened, you can use the same instructions, but instead of selecting Inbound Rules on step No. 4, you would choose the Outbound Rules options, and then follow the same steps.

  1. Open Windows Defender Security Center.

  2. Click on Firewall & network protection.

  3. Click the Advanced settings link.

  4. Select Outbound Rules from the left pane.

  5. Under “Actions,” from the right pane, click the New Rule option.

  6. Select the Port option.

  7. Click the Next button.

  8. Select the appropriate protocol (TCP or UDP) depending on the application.

  9. In the Specific local ports field, type the port number.

  10. Click the Next button.

  11. Select the Allow the connection option.

  12. Click the Next button.

  13. Select the network type the new rule should apply to.

  14. Click the Next button.

  15. Type a descriptive name for the rule.

  16. Click the Finish button.

After completing the steps, outbound connections will be allowed for your application through the port you open in the firewall.

How to close a port using the Windows 10’s firewall

If you no longer have use for the rule, you can disable or delete it from the firewall using these steps.

  1. Open Windows Defender Security Center.

  2. Click on Firewall & network protection.

  3. Click the Advanced settings link.

    Windows Defender firewall settings
    Windows Defender firewall settings
  4. Select Inbound Rules or Outbound Rules from the left pane depending where the rule with the open port is located.

  5. Select the rule you want.

  6. Under “Actions,” click the desire action: Disable Rule or Delete.

    Disable or delete firewall rule
    Disable or delete firewall rule

Once you’ve completed the steps, the app or service will no longer have access to the network or internet.

If you’re having issues configuring your firewall, you can submit your questions in the Pureinfotech forums.