Last updated on November 9th, 2026 at 02:11 pm
When one game, printer, local server or installer will not connect and you want to rule out the firewall, open Settings > Update & Security > Windows Security > Firewall & network protection, pick the network marked (active) and switch Microsoft Defender Firewall off. The switch works per network profile. Test, then turn it straight back on. If the firewall was the problem, allowing just that app through is the safer permanent fix.
Before you switch it off: the five-minute test plan
Applies to: Windows 10 Home and Pro. A firewall matters more, not less, on a PC that gets fewer fixes. If your PC runs Windows 11, the Settings path differs, so follow turning off the firewall in Windows 11 instead.
Turning the firewall off is a diagnostic step, not a fix. The goal is to answer one question: does the blocked thing start working when the firewall is out of the way? A short plan keeps the window of exposure small:
- Close your web browser, email and anything you do not need for the test.
- Write down which network profile is active (the next sections show where to look), because that is the only one you need to turn off.
- Turn the firewall off for that profile only.
- Try the blocked app, game, printer or connection once.
- Turn the firewall back on right away, whatever the result.
- If the test worked, allow that one app or port through the firewall. If it did not, the firewall was not the cause, and you can look elsewhere with it switched on.
Here is how that plays out. Priya runs a small game server on her desktop so friends on the same home Wi-Fi can join. Nobody can connect. She checks the profile (Private network, active), turns the firewall off for Private only, asks a friend to try, and the friend gets in. She turns the firewall back on and adds the server program under Allow an app through firewall for Private networks. Total time with the firewall off: about two minutes.
Jordan’s case goes the other way. His network scanner will not save to the PC. He turns the firewall off for the active profile, tries again, and the scan still fails. He switches the firewall back on and moves on to the scanner’s own settings and the router, because he now knows the firewall is not the culprit.
Never run this test on public Wi-Fi in a cafe, hotel or airport. Wait until you are on a network you trust.
Turn off Microsoft Defender Firewall in Windows Security
Windows Security is the main place to switch the firewall in Windows 10. You need an administrator account, or the administrator’s password when Windows asks for it.
- Select Start > Settings > Update & Security > Windows Security. (You can also type Windows Security in the taskbar search box and open the app.)
- Select Firewall & network protection. The page lists Domain network, Private network and Public network, each with Firewall is on or Firewall is off under it.
- Select the network profile marked (active). At home that is usually Private network; on a network Windows does not trust it is Public network.

- Under Microsoft Defender Firewall, switch the setting to Off.
- When the User Account Control prompt asks whether to allow the change, select Yes. On a standard account, enter an administrator’s password first.

What to expect: the profile now reads Firewall is off, Windows Security shows a warning while it is off. The other two profiles are untouched. To turn it back on, return to the same page and switch it to On.
Just below the switch is Incoming connections with a Blocks all incoming connections, including those in the list of allowed apps box. That box does the opposite of what you want for a test: when checked, it overrides every app you have allowed. If an app that used to work stopped connecting, check that this box is clear before you go further.
Which network profile counts
Windows keeps three separate firewall profiles, and each has its own on/off switch and rules:
| Profile | Used for | How Windows treats it |
|---|---|---|
| Domain network | A work network where the PC is joined to the organization’s domain | Set by your IT team |
| Private network | Networks you trust, such as your home Wi-Fi, where you want sharing and discovery | On; treated as trusted, so sharing can be allowed |
| Public network | Cafes, hotels, airports and any network you have not marked as trusted | On; treated as untrusted |
Only the profile marked (active) applies to your current connection. This is the most common reason a change “does nothing”: someone turns off the Private profile while the PC is actually connected as Public, and the app stays blocked.
If your home network shows up as Public, that is also why sharing, printers and local game servers often fail at home. You can change it in Settings > Network & Internet: select Wi-Fi (then the network you are connected to) or Ethernet, then choose Private under Network profile. Do this only for a network you own or trust. Changing a home network to Private can fix the problem without turning anything off.
Use Control Panel instead
The classic Control Panel applet does the same job and shows both Private and Public settings on one screen, which makes it easy to change exactly one of them. In Windows 10 it still carries the older name Windows Defender Firewall.
- Type Control Panel in the taskbar search box and open it.
- Select System and Security > Windows Defender Firewall.
- In the left pane, select Turn Windows Defender Firewall on or off. Approve the User Account Control prompt.
- Under the settings for the active network type, select Turn off Windows Defender Firewall (not recommended). Leave the other network type on.
- Select OK.
To undo it, go back to the same screen, select Turn on Windows Defender Firewall for that network type and select OK. The main Windows Defender Firewall page shows the current state for each network type, so you can check it at a glance.
Turn the firewall off and on with a command
Commands are handy for remote support, scripts or a quick on/off pair you can paste. Both need an elevated window: right-click Start and choose Windows PowerShell (Admin) or Command Prompt (Admin), whichever your menu shows, or search for Command Prompt and pick Run as administrator. If you are not sure how, running a program as administrator in Windows 10 walks through it.
With netsh (Command Prompt or PowerShell)
The netsh advfirewall command is long established and still works in Windows 10. Target only the profile you need:
netsh advfirewall set currentprofile state offturns off the profile in use right now.netsh advfirewall set currentprofile state onturns it back on.netsh advfirewall set privateprofile state offorpublicprofileordomainprofiletargets one named profile.netsh advfirewall set allprofiles state offturns off all three at once. Avoid this unless you have a reason, because it also drops protection for any network you join while it is off.
If you get an error that mentions elevation, the window is not running as administrator.
With PowerShell
Microsoft documents the Set-NetFirewallProfile cmdlet for both Windows 10 and Windows 11:
- Off for all profiles:
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False - On for all profiles:
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True - One profile only:
Set-NetFirewallProfile -Profile Private -Enabled False, then the same line withTrueafterward.
Check the real state
Run Get-NetFirewallProfile | Format-Table Name, Enabled in PowerShell, or netsh advfirewall show allprofiles state in either window. You get one line per profile showing whether it is on. This is the quickest way to confirm the firewall really came back on after a test, especially when you ran the off command over a remote session.
Turn it back on and reset the rules
Turning the firewall back on is the same switch, the same Control Panel option, or the matching on or True command. Windows Security keeps showing a warning until every profile is on, which is a useful reminder if you forget.
If the firewall is on but behaving oddly (an app that should be allowed is blocked, or you added rules months ago and cannot remember what they do), resetting is often cleaner than turning it off:
- Windows Security: on Firewall & network protection, select Restore firewalls to default and confirm the reset.
- Control Panel: in Windows Defender Firewall, select Restore defaults in the left pane.
A reset removes every custom rule and every app you allowed, so expect some programs to ask for access again the next time they run. On a work PC, Microsoft notes that your organization’s policies are reapplied after a reset.
Allow one app or open one port instead
Once a test shows the firewall is blocking something, give that one program access and keep everything else protected:
- On Firewall & network protection, select Allow an app through firewall.
- Select Change settings and approve the prompt.
- Find the app in the list and check its box, then check Private, Public or both. For home use, Private alone is usually enough.
- If the app is not listed, select Allow another app, point it to the app’s program file, then add it.
- Select OK, then try the app again.
Some things are not tied to one program file, such as a service listening on a fixed port or a device that needs a specific port. For those, opening a single port in Windows 10 is the narrower and safer rule.
If a security suite such as Norton is doing the blocking rather than Windows, the allow list lives in that suite. Stopping Norton from blocking a program covers that route.
For anything beyond simple allow rules (outbound rules, rules for one IP address, logging), Advanced settings on the Firewall & network protection page opens Windows Defender Firewall with Advanced Security. You can also open it by selecting Start, typing wf.msc and pressing Enter.
When the switch is grayed out, flips back or changes nothing
The switch is grayed out or says your organization manages it
Microsoft notes that an organization’s policy can prevent you from changing firewall settings. A work or school PC usually has its firewall set through Group Policy or device management, including a setting called Protect all network connections. Ask your IT team for an exception rather than trying to get around it. On your own PC with Windows 10 Pro, a policy you or a previous owner set can do the same; opening the Group Policy Editor in Windows 10 is where you would review it.
Windows Security says another app is in charge
When a third-party security suite with its own firewall is installed, it usually takes over from Microsoft Defender Firewall, and Windows Security may list that app as the provider. Make the change in the suite instead, preferably by allowing the program rather than switching the suite’s firewall off. If you are choosing or replacing a suite, installing antivirus in Windows 10 explains how a new one takes over.
It turns itself back on
Policy refreshes on managed PCs, a security suite, or a reset can all turn the firewall back on. On a personal PC that is a good outcome. Leave it on and add an allow rule instead of fighting it.
The app is still blocked with the firewall off
Then something else is blocking it. Check, in this order: that you turned off the active profile, a second firewall in a security suite, a VPN that isolates your PC from the local network, the router (port forwarding for connections from outside your home, or client isolation on guest Wi-Fi), and the app’s own network settings. Turn the Windows firewall back on before you continue. Windows Security also links to the network troubleshooter on the same page, and resetting network settings in Windows 10 is a reasonable next step when the whole connection is misbehaving.
Do not stop the firewall service
Some guides suggest stopping or disabling the Windows Defender Firewall service (its service name is MpsSvc) in Services. Microsoft warns against this: stopping the service is not supported, and it can cause problems such as the Start menu failing, apps from the Store not installing or updating, and phone activation of Windows not working. If you need the firewall off, turn off the profiles with the switch or a command and leave the service running.
What stays protected while it is off
The firewall and Microsoft Defender Antivirus are separate features. With the firewall off, the antivirus keeps scanning files, but incoming network connections are no longer filtered for that profile, so any program or device on the network can reach services on your PC. Microsoft recommends keeping the firewall on and lists what you lose without it, including connection security rules and protections that start with the PC.
That is why this guide never suggests leaving it off. Keep the test short, keep it on a trusted network, and turn it back on as soon as you have your answer. If you have been running with it off for a while, turn it on and check Windows 10 for malware to be safe.
The antivirus side has its own switches. If you landed here because an installer was blocked as a threat rather than a network connection, that is Defender Antivirus at work, and disabling Defender in Windows 10 explains what can and cannot be turned off there. If real-time protection is off and you want it back, turning Windows Defender back on in Windows 10 covers that.
Questions about turning the firewall off and back on
Can I turn it off for only Private or only Public networks?
Yes, and you should. Every method above works per profile: pick one profile in Windows Security, change one network type in Control Panel, or name one profile in the command. Turning off only the active profile keeps you protected if the laptop moves to another network.
Will turning off the firewall fix my game or app not connecting?
It will tell you whether the firewall is the cause. Connections from outside your home also need port forwarding on the router, and many online games connect outward, which the Windows firewall normally allows. If the test fails, the firewall was not the problem.
How do I know the firewall is really back on?
Firewall & network protection should show Firewall is on under all three profiles with no warning, and the PowerShell or netsh check command should report every profile as on.
Is it safe to install something with the firewall off?
Installers rarely need the firewall off. If a program asks for network access during or after setup, Windows may ask whether to allow it. Approve it for Private networks, and keep the firewall on during the install.
Does a reset bring back a firewall I turned off?
Yes. Restoring the defaults puts every profile back to Windows’ default settings, which have the firewall on (unless a work policy says otherwise), and removes custom rules, so it doubles as a clean recovery if you lose track of what you changed.
Next time something will not connect, start with Allow an app through firewall and check which profile is active. You may never need to switch the firewall off at all. Microsoft’s Firewall and network protection in the Windows Security app page explains each setting on that screen, and its firewall command-line reference covers the PowerShell options in more depth.

Matt Jacobs writes and maintains the guides on Support Your Tech, which he started in 2017. He spent most of his career keeping small-business PCs running and still takes the occasional consulting job, so the steps here come from fixing the same problems on other people’s computers. Every guide is checked on his own Windows 11, Windows 10, Mac, iPhone and iPad before it goes up.