How To Turn Windows Firewall On Or Off In Windows 11 (2026)
Windows 11 turns Microsoft Defender Firewall on for you, but you can switch it off for a single network type in a few clicks.
Microsoft advises against leaving it off, so this guide also shows how to check its state and turn it back on.
Every step below comes from Microsoft’s own support and documentation pages.
Table of Contents
- Quick answer
- Open the firewall page in Windows Security
- Turn the firewall off or on for one network
- Which network profile to choose
- Check whether the firewall is on
- Turn it off or on with PowerShell
- Do not stop the firewall service
- Allow one app instead of turning the firewall off
- Block all incoming connections
- If you cannot change the setting
- Put the firewall back to its default state
- Official sources
- More antivirus and Windows Security guides
Quick answer
| What you want | Where to do it |
|---|---|
| Turn the firewall off or on | Windows Security > Firewall & network protection > pick the network profile > Microsoft Defender Firewall switch |
| See which profile is active | The Firewall & network protection page marks the network you are connected to |
| Check the state with a command | Get-NetFirewallProfile | Select-Object Name, Enabled |
| Turn it off for every profile | Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False |
| Turn it back on for every profile | Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True |
Open the firewall page in Windows Security
- Open the Start menu, search for Windows Security and open the app.
- Select Firewall & network protection.
- Look at which network type the page shows as connected.
Microsoft notes that a device is usually connected to one network at a time.
Windows Security can also open this page through the shortcut windowsdefender://network/.
Turn the firewall off or on for one network
- On the Firewall & network protection page, select Domain network, Private network or Public network.
- Under Microsoft Defender Firewall, switch the setting to Off or On.
The switch applies only to the profile you opened, so a firewall you turned off for your home network stays on for public Wi-Fi.
Microsoft’s page warns that turning off Windows Firewall could make your device more vulnerable to unauthorized access.
Which network profile to choose
| Profile | What it means | Applied when |
|---|---|---|
| Private | A trusted network such as home, where other devices may see your PC | Trusted networks; an administrator can set it by hand on an interface |
| Public | An untrusted network such as a cafe, airport or hotel, with stricter controls | The default for networks Windows cannot identify |
| Domain | A workplace network managed by an organization | The PC is joined to an Active Directory domain and a domain controller is reachable; it cannot be set manually |
Rules are stored per profile, so an app can be allowed on a private network and blocked on a public one.
If Windows picked the wrong type, Microsoft documents the PowerShell commands Get-NetConnectionProfile and Set-NetConnectionProfile for switching between private and public.
Check whether the firewall is on
- Open Terminal or PowerShell from the Start menu.
- Run
Get-NetFirewallProfile | Select-Object Name, Enabled. - Read the Enabled column for Domain, Private and Public.
Microsoft’s reference for the command lists this form for showing the Name and Enabled values of each profile.
To see what applies after Group Policy, add -PolicyStore ActiveStore to the command.
To look at one profile, add -Name Public instead.
Turn it off or on with PowerShell
Open the window as an administrator first, as explained in how to open Terminal as administrator in Windows 11.
| Goal | Command from Microsoft’s documentation |
|---|---|
| Turn on, all profiles | Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True |
| Turn off, all profiles | Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False |
| One profile only | List only that name after -Profile, for example -Profile Public |
Microsoft’s command-line page shows the first two commands for the local device.
Its one-profile form follows from the same syntax.
Do not stop the firewall service
Microsoft says that if you must disable the firewall, you should not do it by stopping the Windows Defender Firewall service, whose service name is MpsSvc.
Stopping it is not supported and can cause problems.
- The Start menu can stop working.
- Modern apps can fail to install or update.
- Activation of Windows by phone can fail.
- Apps or parts of Windows that depend on the firewall can become incompatible.
The supported method is to turn the profiles off and leave the service running.
Microsoft also says that turning the firewall off removes benefits such as connection security rules, protection against network fingerprinting attacks, Windows Service Hardening and boot-time filters.
Allow one app instead of turning the firewall off
If a single program is blocked, Microsoft’s page suggests allowing that app through the firewall instead of switching protection off.
The steps for apps and ports are in how to allow an app through Windows Firewall in Windows 11.
If you only need to pause virus scanning for a trusted file, see how to turn off Microsoft Defender real-time protection, which is a separate setting.
Block all incoming connections
The same page has a checkbox named Blocks all incoming connections, including those in the list of allowed apps.
Selecting it makes the firewall ignore your allowed apps list.
Microsoft says this raises security but might stop some apps from working.
If you cannot change the setting
- On a work or school PC, policy settings might prevent changes to the firewall, and Microsoft says to contact your administrator.
- If the switch is missing on a PC with another security product, check that product, because non-Microsoft firewall software can turn off only the Windows Firewall rule types it needs.
Do not try to get around a policy set by an organization.
Put the firewall back to its default state
If changes caused trouble, Firewall & network protection has a Restore firewalls to default link that resets the settings to how the computer was when you first received it.
Microsoft says organizational policies are reapplied afterward.
Defaults for Windows Firewall block unsolicited incoming traffic and allow outgoing traffic unless a rule says otherwise.
Official sources
- Firewall and network protection in the Windows Security app (Microsoft Support)
- Windows Firewall overview (Microsoft Learn)
- Manage Windows Firewall with the command line (Microsoft Learn)
- Get-NetFirewallProfile (Microsoft Learn)
More antivirus and Windows Security guides
- How To Allow An App Through Windows Firewall In Windows 11 (2026)
- How To Restore A File Quarantined By Windows Defender (2026)
- How To Uninstall Bitdefender Completely On Windows (2026)
- How To Uninstall Avast Or AVG Completely On Windows (2026)
- How To Remove Norton From Windows With The Remover Tool (2026)
- How To Remove OneLaunch From Windows 11 (2026)