If Windows Defender Firewall won’t turn on, the fix usually involves resetting the firewall service, clearing corrupted settings, or removing conflicting third-party security software. Start by running the built-in Windows Security troubleshooter, then check the firewall service and group policy settings as described below.
Why the Firewall Fails to Activate
Windows Defender Firewall can fail to activate for several reasons, most of which are fixable without reinstalling Windows. Common causes include:
- Third-party antivirus or firewall software that disables the Windows firewall and doesn’t re-enable it when uninstalled.
- Corrupted firewall settings or registry keys left behind after a system update or a previous reset.
- The Windows Defender Firewall service (mpssvc) is stopped or disabled, either manually or by malware.
- Group Policy or registry restrictions that block user changes to the firewall.
- Outdated or corrupted network drivers that prevent the firewall from binding to network adapters.
Knowing the exact cause helps you choose the right fix. The steps below move from the simplest, least invasive solution to more advanced ones.
Quick Fixes to Try First
- Run the Windows Security troubleshooter. Go to Settings > Update & Security > Troubleshoot > Additional troubleshooters (Windows 10) or Settings > System > Troubleshoot > Other troubleshooters (Windows 11). Select Windows Security and run it. This automatically detects and repairs common firewall issues.
- Restart the Windows Defender Firewall service. Press Win + R, type
services.msc, and press Enter. Find Windows Defender Firewall, right-click it, and select Restart. If the service is not running, set its startup type to Automatic and start it. - Check for conflicting security software. If you recently uninstalled a third-party antivirus, use the vendor’s removal tool to clean leftover drivers and services. Then restart your PC and try enabling the firewall again.
These steps resolve a large portion of activation failures. If the firewall still won’t turn on, move to the registry and policy checks below.
Reset Firewall Settings to Default
Corrupted settings can be reset through the Windows Security app. Open Windows Security, go to Firewall & network protection, and click Restore firewalls to default. This resets all firewall rules to their original state. Note that this will remove any custom rules you’ve created, so you may need to re-add them afterward.
If the reset button is grayed out or doesn’t work, you can reset the firewall policy from an elevated Command Prompt. Right-click the Start button, select Windows Terminal (Admin) or Command Prompt (Admin), and run:
netsh advfirewall reset
This command restores the default firewall policy and should re-enable the firewall if it was disabled by policy changes.
Check Group Policy and Registry Restrictions
On Windows Pro, Enterprise, or Education editions, Group Policy can block firewall changes. Press Win + R, type gpedit.msc, and navigate to Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall. Ensure that the policy Protect all network connections is set to Not Configured or Enabled. If it’s set to Disabled, the firewall is turned off by policy, and you must change it here.
For all editions, check the registry. Open Registry Editor (regedit) and go to:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall
If there is a StandardProfile or DomainProfile key with a EnableFirewall DWORD set to 0, that disables the firewall. Change the value to 1 or delete the key. Be careful when editing the registry—back it up first.
Repair Corrupted System Files
If the above steps fail, system file corruption may be the culprit. Run the System File Checker (SFC) and Deployment Imaging Service and Management Tool (DISM) from an elevated Command Prompt:
- Run
DISM /Online /Cleanup-Image /RestoreHealthand wait for it to complete. - Then run
sfc /scannowand restart your PC.
These commands repair Windows system files and should restore the firewall components if they were damaged.
Re-register the Firewall App and Service
Another effective fix is re-registering the firewall’s built-in app and service. Open an elevated PowerShell (right-click Start, select Windows Terminal (Admin)) and run:
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store" -Name "C:\Windows\System32\Firewall.cpl" -Value 1
This is less common, but it can help when the firewall control panel applet is misregistered. After running it, restart your PC and try enabling the firewall again.
Frequently Asked Questions
Why does my firewall keep turning off by itself?
This usually happens because third-party security software is overriding it, or a scheduled task re-disables it. Check your installed programs for any leftover security tools, and use their official removal tools. Also run a full malware scan, as some malware disables the firewall to avoid detection.
Is it safe to use the registry to fix the firewall?
Editing the registry is safe if you follow instructions carefully and back it up first. Incorrect changes can cause system instability, so only modify the keys mentioned in the guide and avoid changing anything else.
Can I use a third-party firewall instead of Windows Defender Firewall?
Yes, you can use a reputable third-party firewall. However, you should only have one firewall active at a time to avoid conflicts. If you install a third-party firewall, it will typically disable Windows Defender Firewall automatically.
What does the “netsh advfirewall reset” command do exactly?
It restores the Windows Firewall policy to its default state, which includes enabling the firewall for all profiles (Domain, Private, Public) and removing all custom rules. It does not affect other system settings.
Will resetting the firewall delete my network rules?
Yes, resetting the firewall to default removes all custom inbound and outbound rules you’ve created. You’ll need to re-add any special rules for apps or ports after the reset.
Do I need to restart after fixing the firewall?
Yes, a restart is recommended after making changes to services, registry, or policy settings. It ensures all components reload with the new configuration.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Gmail Notifications Not Working? Fixes That Work
- Fix Thumbnails Not Showing on Network Drives in Windows 11
- Stop Skype Auto-Start in Windows: 5 Fixes
- SQL Injection Prevention: Step-by-Step Guide
- Fix Windows PowerShell Popping Up
- Print iMessage or Text Conversations on iPhone & iPad