Device security

How to Turn Off Windows Firewall in Windows 11 and 10 (5 Safe Ways)

Turning off Windows Firewall takes less than a minute, but leaving it off leaves your PC exposed. Here are five methods, the safer alternative, and how to turn it back on.

Cysoro Security TeamPublished · 10 min read
Firewall & network protectionMicrosoft Defender FirewallOff — Private networkTurn it back on when done DEVICE SECURITY WindowsFirewall Off, on, and back on safely.
Quick answer

Open Windows Security, select Firewall and network protection, click your active network profile (Domain, Private, or Public), and switch Microsoft Defender Firewall to Off, then approve the User Account Control prompt. The change applies immediately. Turn the firewall back on as soon as you finish troubleshooting, because while it is off nothing filters inbound connections to your PC.

Key takeaways

  • Windows Security is the fastest way to turn off the firewall for one network profile; Command Prompt and PowerShell can switch all profiles at once.
  • Turning the firewall off removes a key layer of defense, so only do it briefly for troubleshooting and turn it back on right away.
  • Allowing one blocked app through the firewall is usually safer than turning the whole firewall off.

Windows Firewall is on by default, and that is how it should stay most of the time. But sometimes a game will not connect, a printer will not appear, or an app keeps getting blocked — and the fastest way to find out whether the firewall is the cause is to switch it off for a few minutes.

How do I turn off Windows Firewall?

Open Windows Security, select Firewall & network protection, click your active network profile, and switch Microsoft Defender Firewall to Off. Approve the User Account Control prompt if one appears.

The change applies immediately, with no restart. This switches the firewall off for that one profile only — Domain, Private, or Public — so your other profiles stay protected. Turn it back on as soon as your test is done.

You need an administrator account to change the setting. If the switch is greyed out, your PC is probably managed by an employer or school. The sections below cover the click-by-click method, Command Prompt, PowerShell, Control Panel, and Group Policy.

What is Windows Firewall?

Microsoft Defender Firewall, often still called Windows Firewall, filters network traffic coming into and out of your PC. It allows or blocks connections based on rules about IP addresses, network ports, and application paths.

It is on by default in Windows 10 and Windows 11, and Microsoft recommends keeping it on even if you already use another firewall. It is one layer of defense, not the whole defense: it works alongside antivirus, updates, and safe browsing habits.

The firewall applies different rules to three network profiles. A Domain network is your workplace network. A Private network is a trusted network such as your home Wi-Fi, where other devices on the network are allowed to see yours. A Public network is an untrusted one, such as coffee-shop Wi-Fi, where other devices should not be able to see or connect to your PC.

How do I check if Windows Firewall is on?

Check the current status first, so you know what you are changing and can confirm your change worked. Open the Start menu, type Windows Security, and open the app.

Select Firewall & network protection. The page shows each network profile with its own status, and marks the network you are connected to as active. A green checkmark means protection is active; a warning means the firewall is off for that profile.

To check from the command line, open PowerShell and run Get-NetFirewallProfile | Select-Object Name, Enabled. It lists each profile and whether it is enabled. This is the fastest way to confirm the state on all three profiles at once.

The three firewall profiles — only switch off the one you needDomainWorkplace networkManaged by youremployer or schoolUsually lockedPrivateHome Wi-FiTrusted devicescan see your PCSafest to test herePublicCoffee shop, hotel,airport Wi-FiStrangers on thesame networkKeep this one onThe switch applies to one profile only — the others stay protected.
The three Windows Firewall profiles and which one is safest to switch off briefly. Illustration by Cysoro.

Method 1: Turn off Windows Firewall in Windows Security

This is the standard method, and the one Microsoft documents this method. It works the same way in Windows 11 and Windows 10, with only small differences in where Settings lives.

  1. Open the Start menu, type Windows Security, and press Enter.
  2. Select Firewall & network protection.
  3. Click the active network profile: Domain network, Private network, or Public network.
  4. Under Microsoft Defender Firewall, switch the setting to Off.
  5. Click Yes on the User Account Control prompt if one appears.

Test whatever was blocked right away, then come back to the same page and switch the firewall back to On. If the problem goes away while the firewall is off and returns when it is on, the firewall was the cause — and the fix is usually an app rule, not leaving the firewall off.

You can also reach the same page from Settings: in Windows 11 go to Settings > Privacy & security > Windows Security > Firewall & network protection. In Windows 10 the path is Settings > Update & Security > Windows Security.

Method 2: Turn off Windows Firewall in Control Panel

Control Panel still works in Windows 11 and Windows 10, and it lets you switch off more than one profile in one place. This is useful if you want to turn the firewall off for both private and public networks at once.

  1. Open the Start menu, type Control Panel, and open it.
  2. Click System and Security, then Windows Defender Firewall.
  3. In the left pane, click Turn Windows Defender Firewall on or off.
  4. Under Private network settings and Public network settings, select Turn off Windows Defender Firewall (not recommended) for each profile you want to switch off.
  5. Click OK to apply.

Microsoft labels the off option "not recommended" for a reason. Treat this as a diagnostic step, not a permanent setting, and reverse it when your test is done.

Method 3: Turn off Windows Firewall with Command Prompt

One command switches the firewall off for all profiles at once. This is the fastest method for scripts, remote sessions, or when the Settings app will not open.

  1. Open the Start menu, type cmd, right-click Command Prompt, and select Run as administrator.
  2. Click Yes on the User Account Control prompt.
  3. To switch all profiles off, run: netsh advfirewall set allprofiles state off
  4. To switch them back on, run: netsh advfirewall set allprofiles state on

To switch off one profile only, replace allprofiles with domainprofile, privateprofile, or publicprofile. For example, netsh advfirewall set privateprofile state off switches off only the private profile. A normal Command Prompt window returns an access error, so the window must be elevated.

Method 4: Turn off Windows Firewall with PowerShell

PowerShell gives the same control with a clearer command, and it is the method Microsoft documents for managing firewall profiles in scripts and automation.

  1. Open the Start menu, type PowerShell, right-click it, and select Run as administrator.
  2. To switch all profiles off, run: Set-NetFirewallProfile -Profile Domain,Private,Public -Enabled False
  3. To switch them back on, run: Set-NetFirewallProfile -Profile Domain,Private,Public -Enabled True

To switch off one profile only, list just that name after -Profile, for example Set-NetFirewallProfile -Profile Private -Enabled False. Check the result with Get-NetFirewallProfile | Select-Object Name, Enabled — every profile should show the state you expect.

PowerShell is also the right tool for checking what changed: run the Get-NetFirewallProfile command before and after, and you have a record of the change for your own notes or an IT ticket.

Method 5: Turn off Windows Firewall with Group Policy (admins only)

Group Policy is for IT administrators managing many PCs on a domain. It sets the firewall for every computer the policy applies to, so do not use it on a single home PC.

  1. Open the Group Policy Management Console on a domain controller, or run gpedit.msc on a Pro or Enterprise edition of Windows.
  2. Go to Computer Configuration > Windows Settings > Security Settings > Windows Defender Firewall with Advanced Security.
  3. Open the profile you want to change — Domain, Private, or Public — and set Firewall state to Off.
  4. Apply the policy and run gpupdate /force on the affected PCs.

On a work PC, a domain policy can override anything you change locally. If your switch flips back to On, or the setting is greyed out, a Group Policy is almost certainly enforcing it. That is your IT team protecting the network, and you should talk to them rather than work around it.

Five ways to turn it off — simplest first1. Windows SecurityFastest — one profile2. Control PanelSeveral profiles at once3. Command Prompt — netsh advfirewallAll profiles, one command4. PowerShell — Set-NetFirewallProfileBest for scripts5. Group PolicyAdmins, many PCsEvery method needs an administrator account.
Five methods to turn off Windows Firewall, from simplest to most advanced. Illustration by Cysoro.

Which method should you use?

For most people, Windows Security is the right choice: it is visual, it changes one profile at a time, and it is hard to get wrong. Use the command line only when you need to change all profiles at once or automate the change.

MethodBest forProfiles at onceNeeds admin
Windows SecurityMost users, quick testOneYes
Control PanelSwitching two profilesSeveralYes
Command PromptFast all-profiles switchAllYes
PowerShellScripts and automationAll or oneYes
Group PolicyIT admins, many PCsAll, by policyYes

Whichever method you use, the rule is the same: switch it off, test, switch it back on. Set a timer on your phone if you think you might forget.

What happens when Windows Firewall is off?

When the firewall is off, nothing filters inbound connections to your PC. Microsoft warns that turning it off could make your device, and your network, more vulnerable to unauthorized access.

In practice, that means a service or app listening on your PC can be reached by anything on the same network, including malware on another device or an attacker scanning for open ports. On a home network behind a router, the risk is lower than on public Wi-Fi, but it is never zero.

CISA guidance on protecting networks makes the same point in broader terms: keep your defenses up, patch promptly, and do not disable a security control for longer than the task requires. A firewall that is off for an afternoon of troubleshooting is a calculated risk; a firewall that is off for months is an open door.

Do not stop the firewall serviceDisabling the Windows Defender Firewall service itself, rather than switching the firewall off, can break Windows Security and leave the PC in a worse state. Use the switch or the commands above instead.

How do I allow one app through the firewall instead?

Allowing one app through the firewall is usually the real fix. It keeps protection for everything else while letting the blocked program work, which is what Microsoft recommends when an app is being blocked.

  1. In Windows Security, go to Firewall & network protection and click Allow an app through firewall.
  2. Click Change settings, then find the app in the list and tick the boxes for the networks it needs.
  3. If the app is not listed, click Allow another app and browse to its executable file.
  4. Click OK, then test the app again with the firewall still on.

Only allow apps you trust, and only on the networks they need. A game that needs access on your private home network does not need it on public Wi-Fi. If you are not sure an app is legitimate, do not allow it — look up the app name and the file path first.

For a wider check of your home setup, our guide to how to secure your Wi-Fi covers router settings that work alongside the firewall.

You can also check your own network exposure with the free what-is-my-IP tool.

How do I turn Windows Firewall back on?

Go back to Windows Security, select Firewall & network protection, open the profile you switched off, and set Microsoft Defender Firewall to On. Do this for every profile you changed.

From an administrator Command Prompt, run netsh advfirewall set allprofiles state on. From PowerShell, run Set-NetFirewallProfile -Profile Domain,Private,Public -Enabled True. Then confirm with Get-NetFirewallProfile | Select-Object Name, Enabled — every profile should show Enabled as True.

If the firewall will not turn back on, restart the PC and try again. If it still will not switch on, run the Network troubleshooter from the firewall page, and check whether third-party security software has taken over firewall duties — some antivirus products replace the Windows firewall with their own, which is fine as long as one firewall is actually running.

What if I cannot turn the firewall off or on?

A greyed-out switch usually means one of three things: you are not signed in as an administrator, a Group Policy is enforcing the setting, or third-party security software is managing the firewall.

  • Not an administrator: sign in with an administrator account, or right-click the tool and choose Run as administrator.
  • Managed by your organization: contact your IT administrator. Policy settings can prevent you from completing these steps, as Microsoft notes in its firewall guidance.
  • Third-party security software: open that product and change its firewall setting there. Turning off Windows Firewall while another firewall is running is normal, but make sure at least one firewall is on.
  • Setting flips back: a policy or a security product is reapplying it. Check Group Policy with gpresult /r in an administrator Command Prompt, or ask IT.

On Windows 10, the same steps apply, but the Settings path is Settings > Update & Security > Windows Security instead of Privacy & security. The firewall itself behaves the same way in both versions.

The bottom line

Turning off Windows Firewall is easy — a switch in Windows Security, or one command for all profiles — but it should always be temporary. Switch it off, test the app or connection, then switch it back on and confirm every profile shows as enabled.

If one app keeps getting blocked, allow that app through the firewall instead of switching the whole thing off. That keeps your PC protected while fixing the actual problem.

You can check the rest of your setup with the free security headers checker.

Frequently asked questions

How do I turn off Windows Firewall in Windows 11?

Open Windows Security, select Firewall and network protection, click the active network profile, and switch Microsoft Defender Firewall to Off. Approve the User Account Control prompt if one appears. The change applies immediately and needs no restart.

Is it safe to turn off Windows Firewall?

No, not for long. Turning it off removes filtering of inbound network traffic, which Microsoft warns can make your device more vulnerable to unauthorized access. Turn it off only briefly to test whether it is causing a problem, then turn it back on.

How do I turn Windows Firewall back on?

Go back to Windows Security, select Firewall and network protection, open the same network profile, and switch Microsoft Defender Firewall to On. Or run netsh advfirewall set allprofiles state on from an administrator Command Prompt.

Why is the Windows Firewall switch greyed out?

Your PC may be managed by your employer or school, and a Group Policy or mobile device management setting may prevent changes. You may also lack administrator rights. Ask your IT administrator if the setting is locked.

Should I turn off the firewall or allow one app through it?

Allow one app through it. That keeps protection for everything else while fixing the blocked program. Microsoft makes the same recommendation in its firewall guidance.

Does turning off Windows Firewall speed up my PC or internet?

No, not in any meaningful way. The firewall filters traffic with very little overhead. If a game or app is slow, the cause is almost always the network, the server, or the app itself, not the firewall.

Can I turn off Windows Firewall for one network only?

Yes. Windows Security lets you switch the firewall off for one profile at a time: Domain, Private, or Public. Turning it off for your home network leaves it on for public Wi-Fi, which is the safer choice.

What is the difference between Windows Firewall and Windows Security?

Windows Security is the app that manages protection, including the firewall. Microsoft Defender Firewall is the actual firewall that filters network traffic. Closing the Windows Security app does not turn the firewall off.

Sources

  1. Microsoft Support — Firewall and network protection in the Windows Security app
  2. Microsoft Learn — Set-NetFirewallProfile
  3. Microsoft Learn — netsh advfirewall firewall commands
  4. CISA — Shields Up: guidance on protecting networks
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against Microsoft Support guidance on firewall and network protection and Microsoft Learn documentation for Set-NetFirewallProfile and netsh advfirewall.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free