How to allow apps through firewall on Windows 11

Did Windows 11 block an app from accessing the internet? Here are the steps to allow it through the firewall manually.

Windows 11 allow app in firewall
Windows 11 allow app in firewall / Image: Mauro Huculak
  • To allow app access through the Windows 11 firewall, open Windows Security > Firewall & network protection, click the “Allow an app through firewall” option, click the “Change settings” option, allow the app in the firewall, and click the “OK” button.

Microsoft Defender Firewall is one of the many security features available oWindows 11 that protect your computer and files from external and internal threats.

A firewall acts as a gatekeeper, blocking unused network ports, and every time an app wants to communicate outside your device, it checks whether a rule exists in its database to allow or deny network access. If a rule doesn’t exist, the firewall will prompt you to identify and grant or deny permission.

While the Microsoft Defender Firewall does a pretty good job of automatically managing which apps and features can connect through the network, sometimes you may need to allow or deny an app manually.

In this guide, I’ll show you how to allow or block app access through the Windows 11 firewall.

Allow apps through firewall using Security on Windows 11

To allow an app through the Windows 11 firewall, follow these steps:

  1. Open Windows Security on Windows 11.

  2. Click on Firewall & network protection.

  3. Click the “Allow an app through firewall” option.

    Open Windows 11 firewall configuration

  4. Click the Change settings button.

  5. Check the app to allow it through the Windows 11 firewall.

    Allow app in firewall

    Quick tip: If the app isn’t on the list, click the “Allow another app” button to locate the application you want to allow.
  6. Choose the “Private” option for home or work, or the “Public” option to allow the app in public places, such as coffee shops.

  7. Click the OK button.

Once you complete the steps, the app will have full network access on Windows 11.

Get the Pureinfotech newsletter

Expert Windows guides, practical tips, and the latest updates that make your PC easier to use, delivered to your inbox

If you want to block an app through the firewall, follow the instructions above, but at step No. 5, make sure to clear the checkmark for the app or feature you want to deny network access.

Allow apps through firewall using PowerShell on Windows 11

To allow an app through the firewall using PowerShell, follow these steps:

  1. Open Start.

  2. Search for PowerShell, right-click the top result, and select Run as administrator.

  3. Type this command to use PowerShell to allow an app through the firewall and press Enter:

    New-NetFirewallRule -DisplayName "RULE-NAME" -Direction Inbound -Program "C:\Path\To\App.exe" -Action Allow -Profile Domain,Private,Public

    PowerShell allow app via firewall

    In the command, specify the rule name, path, and executable file for the application, and choose which firewall profiles to use (Domain, Private, and/or Public).

    Quick note: The New-NetFirewallRule command creates an Inbound firewall rule that allows incoming network traffic to the specified app. If you also need to control outgoing connections, you’ll have to create a separate Outbound rule by changing the -Direction parameter.
  4. Type this custom command to check the new rule and press Enter:

    Get-NetFirewallRule -DisplayName "RULE-NAME"
  5. (Optional) Type this custom command to delete the rule and press Enter:

    Remove-NetFirewallRule -DisplayName "RULE-NAME"

After you complete the steps, the PowerShell command will create a new rule that grants the app full network access on Windows 11.

Firewall rule command example:

  • New-NetFirewallRule -DisplayName "Zoom" -Direction Inbound -Program "C:\Users\UserProfile\AppData\Roaming\Zoom\bin\Zoom.exe" -Action Allow -Profile Private,Public
  • Get-NetFirewallRule -DisplayName "Zoom"
  • Remove-NetFirewallRule -DisplayName "Zoom"

This guide focuses on the Microsoft Defender Firewall. However, if you have another security solution, the instructions will be different. As such, you should check your software company’s support website for more specific steps.

Pureinfotech’s Take

I rarely recommend turning off the firewall just because an app can’t connect to the internet. In most cases, allowing that specific app through the firewall is the safer approach, as it keeps the rest of your system protected. Windows 11 does a good job managing firewall rules automatically, but there are still times when you have to step in, especially when using older software, development tools, or self-hosted applications.

I also like that Windows gives you two ways to manage firewall rules. The Windows Security app is straightforward for most people, while PowerShell makes it much faster if you’re configuring multiple computers or prefer working from the command line.

Have you ever had the Microsoft Defender Firewall block an app you needed? Let me know in the comments.

Update June 29, 2026: This guide has been updated to ensure accuracy and reflect changes to the process.

Thank you for your feedback!
About the author

Mauro Huculak is a Windows How-To Expert and founder of Pureinfotech in 2010. With over 23 years as a technology writer and IT Specialist, Mauro specializes in Windows, software, and cross-platform systems such as Linux, Android, and macOS.

Certifications: Microsoft Certified Solutions Associate (MCSA), Cisco Certified Network Professional (CCNP), VMware Certified Professional (VCP), and CompTIA A+ and Network+.

Mauro is a recognized Microsoft MVP and has also been a long-time contributor to Windows Central.

You can follow him on YouTube, Threads, BlueSky, X (Twitter), LinkedIn and About.me. Email him at [email protected].

Comments

Join In