If Windows Security shows that the firewall is off, your PC may be exposed to unwanted network traffic, app abuse, and remote attacks.
This guide explains how to fix Windows Security firewall off by checking services, settings, policies, and common conflicts in Windows 11 and Windows 10.
Why Windows Security Shows the Firewall as Off
The Windows Defender Firewall is built into Microsoft Defender and managed through Windows Security.
It can turn off for several reasons, including a disabled service, a policy set by another security tool, corrupted system files, or a network profile issue.
Sometimes the alert is real, meaning protection is disabled.
In other cases, Windows Security may fail to read the firewall state correctly because of a management service or a third-party application that changed the configuration.
Before You Start
Check whether you have another antivirus or firewall product installed, such as Norton, McAfee, Bitdefender, Kaspersky, ESET, or Avast.
Many third-party security suites include their own firewall and may disable Microsoft Defender Firewall automatically.
- Save your work before making changes.
- Disconnect only if you are troubleshooting a suspected security issue.
- Make sure you have administrator access.
1. Turn the Firewall Back On in Windows Security
The simplest fix is to re-enable the firewall from the Windows Security app.
- Open Start and search for Windows Security.
- Select Firewall & network protection.
- Open each profile: Domain network, Private network, and Public network.
- Toggle Microsoft Defender Firewall to On.
If the switch is grayed out or reverts immediately, a service, policy, or third-party app is likely controlling it.
2. Restart the Firewall and Security Services
Windows depends on background services to manage firewall settings.
If they are stopped, the firewall can appear disabled even when the UI is working.
- Press Win + R, type services.msc, and press Enter.
- Find Windows Defender Firewall.
- Double-click it and set Startup type to Automatic.
- If the service is stopped, click Start.
- Repeat the process for Security Center and Base Filtering Engine.
The Base Filtering Engine is especially important because it helps enforce packet filtering rules.
If it is disabled, Microsoft Defender Firewall may not function properly.
3. Check for a Third-Party Firewall Conflict
A common reason for how to fix Windows Security firewall off is a conflict with another security suite.
These tools may disable Microsoft Defender Firewall and replace it with their own network filtering engine.
What to look for
- Dedicated firewall controls in the antivirus app
- Network protection features labeled as “web shield” or “internet security”
- Security software installed recently before the issue began
If you want to keep the third-party product, use its firewall instead of forcing Windows Defender Firewall on.
If you want to return to Microsoft protection, uninstall the third-party suite completely and restart the computer.
4. Run the Built-in Troubleshooter
Windows includes troubleshooters that can repair common network and security configuration issues.
- Open Settings.
- Go to System > Troubleshoot > Other troubleshooters.
- Run Network Adapter and Internet Connections troubleshooters.
While these tools do not directly repair every firewall issue, they can fix related network stack problems that prevent Windows Security from reporting correctly.
5. Reset the Firewall Configuration to Default
Corrupt or overly restrictive rules can make the firewall behave unpredictably.
Resetting the configuration returns it to Microsoft’s default settings.
- Open Windows Security.
- Select Firewall & network protection.
- Click Restore firewalls to default or open Advanced settings and restore defaults from there.
Be aware that this removes custom rules, including app allowances and port exceptions.
If your organization relies on custom firewall rules, export or document them first.
6. Use the Command Line to Re-Enable the Firewall
If the interface is unresponsive, use Command Prompt or PowerShell as an administrator.
- Right-click Start and open Terminal (Admin) or Command Prompt (Admin).
- Enter the following command:
netsh advfirewall set allprofiles state on
This command turns on the firewall for all profiles.
You can verify the result afterward in Windows Security.
If you prefer PowerShell, you can also use:
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True
7.
Check Group Policy or MDM Management
On work or school devices, an administrator may control firewall settings through Group Policy, Microsoft Intune, or another mobile device management platform.
In that case, local changes may not stick.
Group Policy signs
- The firewall toggle changes back after a reboot
- Security settings show “managed by your organization”
- You cannot edit firewall options in Windows Security
If the device is managed, contact your IT administrator.
For personal PCs, open the Local Group Policy Editor and check whether firewall policies are forcing it off.
8. Repair Windows System Files
Missing or damaged system files can break Security Center or firewall components.
Microsoft provides two core repair commands.
- Open an elevated Command Prompt.
- Run:
sfc /scannow
After SFC completes, run:
DISM /Online /Cleanup-Image /RestoreHealth
SFC repairs protected system files, while DISM repairs the Windows image used as the source for those files.
Together, they solve many stubborn Windows Security issues.
9. Ensure Windows Is Fully Updated
Microsoft regularly patches Defender components, Windows Security UI issues, and networking bugs.
Missing updates can leave firewall controls unstable.
- Open Settings > Windows Update.
- Click Check for updates.
- Install all security and cumulative updates.
- Restart if prompted.
On older systems, the firewall state may be affected by outdated Defender platform components, so staying current matters.
10. Re-register Windows Security Components
If Windows Security itself is glitching, re-registering the app can help restore the interface that manages firewall status.
Open PowerShell as administrator and run:
Get-AppxPackage Microsoft.SecHealthUI -AllUsers | Reset-AppxPackage
If that command is unavailable on your version of Windows, reinstalling or resetting Windows Security components through system repair tools may be necessary.
How to Verify the Fix
After applying a fix, confirm that the firewall is active on every profile you use.
A properly working system should show Microsoft Defender Firewall as On for the active network profile in Windows Security.
- Check the status after a restart.
- Confirm that the toggle stays on.
- Open a browser and verify normal network connectivity.
- Review installed security software if the problem returns.
When the Firewall Still Says Off
If none of the above steps work, the issue may be deeper than a standard configuration problem.
Possible causes include malware interference, a broken Windows installation, or aggressive endpoint management from business software.
In that situation, the safest next steps are to run a full Microsoft Defender scan, perform an offline scan if needed, back up your files, and consider an in-place repair install of Windows.
An in-place repair keeps your data and apps while rebuilding system components that Windows Security depends on.
Useful Terms to Know
- Microsoft Defender Firewall: The built-in Windows firewall that filters inbound and outbound traffic.
- Windows Security: The security dashboard that shows firewall, antivirus, and account protection status.
- Base Filtering Engine: A core Windows service used by firewall and filtering features.
- Group Policy: Administrative rules that can enforce security settings on managed devices.
- DISM: A Windows tool that repairs the operating system image.
By checking services, software conflicts, policies, and system file integrity in order, you can usually solve the problem without reinstalling Windows or losing custom settings.