Enable or Disable Windows Defender Firewall
In this article
Yes, you can turn Windows Defender Firewall on or off in a few clicks, but you should only disable it temporarily (for example, while troubleshooting a network issue or installing a specific program). The firewall is your PC's first line of defense against unauthorized network traffic, so leaving it off for long periods is risky. Here's exactly how to do it in Windows 10 and Windows 11.
What You'll Need
- An account with administrator privileges (the standard user account cannot change firewall settings).
- Windows 10 or Windows 11 – the steps are identical in both, though some menu labels may differ slightly by version or region.
Step-by-Step
- Click the Start button (the Windows logo) and type Windows Security. Press Enter to open the app.
- In the Windows Security window, click Firewall & network protection in the left sidebar (or the shield icon labeled "Firewall & network protection").
- You'll see three network profiles: Domain network, Private network, and Public network. Each profile has its own firewall toggle. Click the one for the network you're currently using (usually Private network for home or work, Public network for Wi-Fi in cafes, airports, etc.).
- On the profile's page, you'll see a toggle under Microsoft Defender Firewall. To turn it off, click the toggle so it changes from blue (on) to gray (off). A User Account Control prompt may appear – click Yes to confirm.
- To turn it back on, repeat the same steps and click the toggle again so it turns blue (on).
Note: If you're troubleshooting a connection issue, you can also temporarily disable the firewall for all three profiles at once by toggling each one off. But remember to re-enable them as soon as you're done.
Common Mistakes
- Turning off the wrong profile: If you're on a public Wi-Fi network, you might accidentally turn off the Public profile while the Private profile stays on (or vice versa). Check which profile is labeled "active" next to it in the Firewall & network protection window.
- Forgetting to turn it back on: The most common mistake is leaving the firewall off after troubleshooting. Set a reminder or write it down.
- Using the old Control Panel method: Windows 10 and 11 still have the legacy Control Panel firewall applet, but it's easier to use Windows Security. If you use the Control Panel, make sure you're changing the correct profile (e.g., "Private" vs. "Public").
- Assuming turning off the firewall is the only way to fix a problem: Often, the issue is a specific app being blocked, not the whole firewall. Try adding an app to the allowed list instead of disabling the firewall entirely.
Tips
- Add an app to the allowed list instead of turning off the firewall: If a program can't connect, go to Windows Security > Firewall & network protection > Allow an app through firewall. Click Change settings, then Allow another app, and select the program. This is safer than disabling the firewall.
- Use the "Restore defaults" option if you mess up: In the Firewall & network protection page, click Restore firewalls to default to reset all firewall settings to their original state. This is useful if you've made many changes and want to start fresh.
- Check if a third-party firewall is running: If you have antivirus software with its own firewall (like Norton, McAfee, or Bitdefender), Windows Defender Firewall may be automatically turned off. In that case, manage the firewall through your third-party software, not Windows Security.
- Use the command line for quick toggling (advanced): If you're comfortable with Command Prompt or PowerShell, you can run
netsh advfirewall set allprofiles state off(to disable) ornetsh advfirewall set allprofiles state on(to enable) as an administrator. This is faster but less visual.
Troubleshooting
If the toggle is grayed out or you can't change it:
- Make sure you're signed in with an administrator account. If you're not, you'll need to ask an admin to change the settings.
- Some third-party security software can override Windows Defender Firewall. Open your antivirus program and check if it has its own firewall settings that might be controlling Windows Firewall.
- Group Policy settings (on managed work or school PCs) can lock firewall settings. If you see a message like "Some settings are managed by your organization," you'll need to contact your IT administrator.
If you turned off the firewall and now have no internet:
- This is rare, but if it happens, turn the firewall back on immediately. If the problem persists, restart your PC and router.
If you can't find Windows Security:
- On Windows 10, you can also go to Settings > Update & Security > Windows Security > Firewall & network protection. On Windows 11, it's Settings > Privacy & security > Windows Security > Firewall & network protection.
If the firewall keeps turning itself back on:
- Windows may automatically re-enable the firewall after a restart or after a security update. This is normal and intended. If you need it off for a longer period, consider adding an app exception instead.
Frequently Asked Questions
Is it safe to turn off Windows Defender Firewall?
No, it's not safe to leave it off for long. Without a firewall, your PC is exposed to malicious network traffic, especially on public networks. Only disable it temporarily for troubleshooting, and turn it back on as soon as you're done.
What's the difference between turning off the firewall and allowing an app through?
Turning off the firewall disables all protection for all apps. Allowing an app through creates a rule that lets that specific app communicate through the firewall while keeping protection for everything else. The latter is much safer.
Will turning off the firewall speed up my internet?
No. The firewall does not slow down your internet connection in any noticeable way. If you're experiencing slow speeds, the cause is likely something else, like your router, ISP, or Wi-Fi signal.
Do I need to turn off the firewall to play online games?
Usually not. Most games work fine with the firewall on. If a game can't connect, add it to the allowed list instead of disabling the firewall. If that doesn't work, check the game's support pages for specific ports to open.
How do I know if my firewall is on or off?
Open Windows Security > Firewall & network protection. You'll see a green checkmark and "On" for each profile that's enabled. If it's off, you'll see a red warning icon and "Off".
Can I turn off the firewall for only one network type?
Yes, each network profile (Domain, Private, Public) has its own toggle. You can turn off the firewall for Public networks while keeping it on for Private networks, for example. But it's not recommended to turn it off for any profile unless necessary.