To turn off the firewall in Windows 10, select Start > Settings > Update & Security > Windows Security > Firewall & network protection. Select the network marked (active), then switch Microsoft Defender Firewall to Off. Turn it back on the same way as soon as you’re done.
Applies to: Windows 10. Checked against Microsoft Support on September 25, 2026.
Turning off the firewall leaves your PC open to unwanted network connections. If one app is being blocked, allow just that app instead (see below).
Turn the firewall off or on
- Select Start > Settings > Update & Security > Windows Security.
- Select Firewall & network protection.
- Select the network profile marked (active), usually Private network at home or Public network elsewhere.

- Under Microsoft Defender Firewall, switch the setting to Off, and select Yes if asked.

To turn it back on, switch it to On. Windows Security also shows a warning with a Turn on button while the firewall is off.
Check your firewall settings
On the Firewall & network protection page, each network shows Firewall is on or Firewall is off. The three profiles are:
- Domain network: work networks managed by an organization.
- Private network: trusted networks, such as your home.
- Public network: networks in places like airports or coffee shops.
Allow one app instead of turning the firewall off
- On Firewall & network protection, select Allow an app through firewall.
- Select Change settings.
- Check the app, then check Private, Public, or both.
- If the app isn’t listed, select Allow another app and browse to it.
- Select OK.
Turn it off or on with a command
- In Command Prompt as administrator,
netsh advfirewall set allprofiles state offturns the firewall off for every network type. Usestate onto turn it back on. - In PowerShell as administrator,
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled Trueturns it on. Use False to turn it off.
Reset the firewall to its default settings
If rules you added are causing trouble, go to Control Panel > System and Security > Windows Defender Firewall and select Restore defaults. This removes every custom rule and allowed app, so you may need to allow some apps again.
More firewall options
- Advanced settings opens Windows Defender Firewall with Advanced Security, where you can create inbound and outbound rules.
- Restore firewalls to default undoes all your changes.
- Under Incoming connections on a network page, Blocks all incoming connections gives extra protection on public Wi-Fi.
If the firewall won’t stay off or on
- It turns itself back on: a work policy or another security app may control it. Check with your IT team, or look in your antivirus app’s settings.
- An app is still blocked with the firewall off: another security app, your router, or the app’s own settings may be blocking it.
- The switch says it’s managed by another app: your antivirus suite has its own firewall. Turn that one off or allow the app there instead.
Frequently asked questions
Can I turn it off from Control Panel?
Yes. Open Control Panel > System and Security > Windows Defender Firewall > Turn Windows Defender Firewall on or off.
Why can’t I change the firewall?
If your PC is managed by work or school, policy settings may lock it. If another security program controls the firewall, change it in that program.
Is my PC protected while the firewall is off?
Windows Security still scans for malware, but network connections aren’t filtered. See how to scan for and remove malware in Windows 10. For connection problems, try resetting your network settings instead.
The firewall is separate from antivirus protection. To manage that, see how to turn Windows Defender on or off in Windows 10.
If only one app needs through, opening a single port is safer than turning the firewall off. See how to open a port in Windows 10.
To stop a website from opening on this PC, see how to block a website in Windows 10.
To block just one app instead of turning the firewall off, see how to block an app from the internet in Windows 10.
Microsoft’s guide is Firewall and network protection in the Windows Security app. More help is on our Windows Help & Guides page.
Related: How to open ports on Windows 11.

Matt Jacobs has been working as an IT consultant for small businesses since receiving his Master’s degree in 2003. While he still does some consulting work, his primary focus now is on creating technology support content for SupportYourTech.com.
His work can be found on many websites and focuses on topics such as Microsoft Office, Apple devices, Android devices, Photoshop, and more.