How to Allow an App Through Windows Defender Firewall (Safely)
Let a program you trust communicate through the firewall when Windows Defender Firewall is blocking its connection.
Why: The firewall blocks unsolicited incoming connections to keep your PC safe. Most apps that just browse out to the internet work fine, but some — multiplayer games, media servers, remote-access or file-sharing tools — need to receive connections too, and the firewall blocks those until you allow the app. Allowing an app is safer than opening a port, because the app only opens the connection when it actually needs it.
Step 1: Open the “Allow an app” list
- Open Windows Security (Start → type Windows Security → open it).
- Select Firewall & network protection.
- Select Allow an app through firewall.
- Select Change settings and approve the admin prompt. The list of apps becomes editable.
Step 2: Allow the app
If the app is already in the list:
- Find it and tick its checkbox.
- Tick Private and/or Public depending on where you need it — Private for your home/work network (recommended), Public for untrusted networks like coffee-shop Wi-Fi (leave this off unless you truly need it).
- Select OK.
If the app isn’t listed:
- Select Allow another app.
- Select Browse, find the program’s
.exefile, and add it. - Tick the network types you need, then OK.
Caution: never allow an app you don’t recognize. Each allowed app is a way for traffic to reach your PC. If you didn’t install it on purpose and don’t know what it does, leave it blocked.
Step 3: Remove the allowance when you’re done
Allowances don’t expire — tidy up so the opening doesn’t linger:
- Windows Security → Firewall & network protection → Allow an app through firewall → Change settings.
- Untick the app’s checkbox (or clear just its Public box if you only want to tighten it), then OK.
If the settings are greyed out
If Change settings is locked or the firewall options are dimmed, your device is likely managed by a workplace policy or a third-party security product is controlling the firewall. On a managed PC, ask your IT admin — the firewall rules are set centrally.
FAQ
Should I allow the app or open a port? Allow the app. A port stays open until you close it; an allowed app only opens its connection when running. Microsoft recommends allowing an app over opening a port for exactly this reason.
What’s the difference between Private and Public here? Private applies on networks you’ve marked as trusted (home/work); Public applies on networks marked untrusted. Allowing an app only on Private keeps it blocked when you’re on public Wi-Fi.
I allowed an app but it still won’t connect. The block may be elsewhere — your router’s firewall, the app needing a specific port forwarded, or another security suite. Confirm the app appears ticked in the list first, then check the app’s own networking requirements.
Sources: Microsoft Support — Risks of allowing apps through Windows Defender Firewall, Microsoft Support — Firewall & network protection in the Windows Security app