Windows

How to Disable the Windows Defender Firewall (and Why Not To)

By ··Updated August 27, 2026·4 min read
What this guide covers
  1. Do this instead, in most cases
  2. An application cannot connect
  3. A game or server needs an inbound port
  4. Printer or file sharing is not working
  5. Turning it off temporarily
  6. From the command line
  7. Understanding the three profiles
  8. Resetting the firewall
  9. Turning it back on
  10. If you cannot turn it on
  11. Frequently asked questions
  12. Is it safe to disable the firewall on a home network?
  13. Do I need it if I have antivirus?
  14. Will disabling it make my internet faster?
  15. What is the difference between the firewall and Defender antivirus?
  16. Why does an app keep asking for firewall access?

Turning off the Windows firewall is occasionally the right diagnostic step and almost never the right permanent state. This guide shows how to do it, how to undo it, and — more usefully — how to solve the underlying problem without leaving the firewall off.

Windows Security firewall and network protection settings
Windows Security → Firewall & network protection.

What the firewall actually protects you from. It blocks unsolicited inbound connections. On a home network behind a router that is a second layer — but on public wi-fi it is the only layer between your machine and everyone else on that network. Turning it off there exposes file sharing, remote desktop and any service listening on your machine directly.

Checked August 2026. Applies to Windows 11 and Windows 10 22H2.

Do this instead, in most cases

Almost every reason people give for disabling the firewall has a targeted answer that keeps it on.

An application cannot connect

Allow that one application rather than everything:

  1. Open Windows SecurityFirewall & network protection.
  2. Select Allow an app through firewallChange settings.
  3. Find the app and tick Private, and Public only if you genuinely need it there.
  4. If it is not listed, Allow another appBrowse to its .exe.

A game or server needs an inbound port

  1. Press Win + R, run wf.msc.
  2. Select Inbound RulesNew Rule.
  3. Choose Port, enter the port, and restrict the rule to the Private profile.

A rule for one port on the private network is a very different thing from switching the firewall off.

Printer or file sharing is not working

Set the network to Private rather than disabling anything: SettingsNetwork & internet → your connection → Private network. Windows blocks discovery on Public networks by design, which is usually the actual cause.

Turning it off temporarily

For a genuine diagnostic test — is the firewall the reason this does not work?

  1. Open Windows Security.
  2. Select Firewall & network protection.
  3. Choose the profile marked (active) — Domain, Private or Public.
  4. Turn Microsoft Defender Firewall off.
  5. Test, then turn it straight back on.

Turn off only the active profile. Disabling all three is broader than any test requires.

From the command line

From an elevated prompt, to disable the private profile only:

netsh advfirewall set privateprofile state off

To turn it back on:

netsh advfirewall set privateprofile state on

To check every profile at once:

netsh advfirewall show allprofiles state

In PowerShell:

Get-NetFirewallProfile | Select-Object Name, Enabled
Set-NetFirewallProfile -Profile Private -Enabled False

Understanding the three profiles

Profile Used for Default behaviour
Domain A network with a domain controller Managed by your organisation
Private Home and trusted networks Discovery and sharing allowed
Public Cafés, airports, hotels Most inbound traffic blocked

Windows applies rules per profile, which is why a printer that works at home fails on a hotel network. The fix is the profile, not the firewall.

Resetting the firewall

If rules have accumulated to the point where you cannot tell what is blocking what, reset to defaults rather than switching it off:

netsh advfirewall reset

This removes every custom rule, including ones added by applications, so they will prompt again on next use.

Turning it back on

The important half of this page.

  1. Windows SecurityFirewall & network protection.
  2. Turn it on for every profile — Domain, Private and Public.

Or in one command from an elevated prompt:

netsh advfirewall set allprofiles state on

Windows Security will show a warning for as long as any profile is off, which is a useful reminder rather than a nuisance.

If you cannot turn it on

  • Third-party antivirus with its own firewall — many disable the Windows one deliberately. Having two active is genuinely problematic; pick one.
  • Group Policy on a work machine — controlled by IT and not changeable locally.
  • The service is stopped: run services.msc and confirm Windows Defender Firewall is Automatic and running.
  • System file damage: run DISM /Online /Cleanup-Image /RestoreHealth then sfc /scannow.

Frequently asked questions

Is it safe to disable the firewall on a home network?

Less dangerous than on public wi-fi, because your router blocks unsolicited inbound traffic from the internet. It still leaves you exposed to everything else on your own network — including a compromised device you do not know about. Allow the specific app instead.

Do I need it if I have antivirus?

They do different jobs. Antivirus inspects files and behaviour; the firewall controls network connections. Most security suites include their own firewall, and in that case one is enough — but “none” is not the same as “one”.

Will disabling it make my internet faster?

No. The firewall’s effect on throughput is not measurable on a normal connection.

What is the difference between the firewall and Defender antivirus?

Microsoft Defender Antivirus scans files and processes. Microsoft Defender Firewall filters network traffic. Both appear in Windows Security and can be controlled separately.

Why does an app keep asking for firewall access?

Because it changed — an update alters the executable, and the existing rule no longer matches. Allow it once for the right profile and the prompt stops until the next update.

1 comment

Found a step that no longer matches?

Tell us which version of Windows, the browser or the app you are running — that is what makes a correction usable. Your email address is not published.