To turn off Windows Firewall, open Windows Security, click Firewall & network protection, choose the network marked (active), usually Private network or Public network, and switch Microsoft Defender Firewall to Off. Click Yes to confirm. Turning off the firewall exposes your PC to attacks, so only do it briefly to troubleshoot, and turn it back on afterward. In most cases, allowing a specific app through the firewall is the better fix.
Turn off the firewall in Windows Security
- Click Start, type Windows Security, and open it.
- Click Firewall & network protection.
- Click the network that says (active).
- Switch Microsoft Defender Firewall to Off, then click Yes.

Each network type has its own switch. Turning it off for your Private network doesn’t turn it off on Public networks, like coffee shop Wi-Fi.
Better option: Allow one app through the firewall
- In Firewall & network protection, click Allow an app through firewall.
- Click Change settings, then find your app in the list and check Private (and Public only if needed).
- If the app isn’t listed, click Allow another app > Browse, choose the program, and click Add.
- Click OK.
To open a specific port instead, use Advanced settings to create an inbound rule. See how to close ports on Windows for how firewall rules work.
Turn off the firewall with Control Panel or a command
- Control Panel: Go to Control Panel > System and Security > Windows Defender Firewall > Turn Windows Defender Firewall on or off, choose Turn off for a network type, and click OK.
- Command: In an admin Command Prompt, run
netsh advfirewall set allprofiles state off. Turn it back on withnetsh advfirewall set allprofiles state on.
Turn the firewall back on
Open Windows Security > Firewall & network protection and click Turn on under any network with a warning, or click Restore settings to reset the firewall to its defaults.
Why can’t I turn off the firewall?
- Another security app manages it: If you use a third-party antivirus suite with its own firewall, change settings in that app.
- Work or school PC: Your organization may control the firewall with Group Policy or Intune. Contact IT.
Frequently asked questions
Is it safe to turn off Windows Firewall?
Only for a short time on a trusted network. Without it, other devices on the network can reach services running on your PC.
Does turning off the firewall fix game or app connection problems?
It can confirm the firewall is the cause. If it is, turn the firewall back on and allow that app instead.
Does this work on Windows 11?
Yes. The steps are the same in Windows 11’s Windows Security app.
Is the firewall the same as antivirus?
No. The firewall controls network connections. Microsoft Defender Antivirus scans for malware. They’re separate settings.

Kermit Matthews is a freelance writer based in Philadelphia, Pennsylvania with more than a decade of experience writing technology guides. He has a Bachelor’s and Master’s degree in Computer Science and has spent much of his professional career in IT management.
He specializes in writing content about iPhones, Android devices, Microsoft Office, and many other popular applications and devices.