
- To reset the firewall settings on Windows 11, open Windows Security > Firewall & network protection, then click “Restore firewall to default” and confirm.
- You can also reset the firewall using Command Prompt (
netsh advfirewall reset
) or PowerShell with a single command.
On Windows 11, if you’re using Microsoft Defender Firewall, there may come a time when you need to reset its settings to the default configuration, whether to troubleshoot and fix connectivity problems, resolve misconfigured rules, or clean up accumulated entries.
Regardless of the reason, the operating system gives you at least four ways to reset the firewall rules using the “Windows Security” app, “Windows Defender Firewall with Advanced Security” (Control Panel), Command Prompt, and PowerShell.
The built-in firewall on Windows 11 includes a core set of inbound and outbound rules designed to protect your system by managing traffic flow and blocking unauthorized access. However, as you install apps or create custom configurations, additional rules are added automatically or manually, which can eventually cause conflicts or unexpected behavior.
Resetting the firewall to its default state is a safe troubleshooting step when apps can’t connect to the network, network file sharing stops working, or you want to remove all user-defined rules and start fresh. However, this process doesn’t remove any of the system default firewall rules.
In this guide, I’ll outline the steps to reset the built-in firewall configuration to its default settings on Windows 11.
- Reset firewall settings on Windows 11
- Reset firewall settings using Advanced Security
- Reset firewall settings using PowerShell
- Reset firewall settings using Command Prompt
Reset firewall settings on Windows 11
To reset the settings for Microsoft Defender Firewall, use these steps:
-
Open Windows Security on Windows 11.
-
Click on Firewall & network protection.
-
Click the “Restore firewall to default” option.
-
Click the Restore default button.
-
Click the Yes button.
Once you complete the steps, the Microsoft Defender Firewall user-defined settings will be deleted, and the default settings will be restored. If you have an app that depends on the firewall settings, you’ll have to reconfigure it.
Alternatively, you can also get to this page from Control Panel > System and Security > Windows Defender Firewall, and click the “Restore default” option from the left navigation pane.
Reset firewall settings using Advanced Security
To reset the Windows 11 firewall settings, use these steps:
-
Open Windows Security.
-
Click on Firewall & network protection.
-
Click the Advanced settings option.
-
Right-click the “Windows Defender Firewall with Advanced Security on Local Computer” item and select the “Restore Default Policy” option.
-
Click the Yes button.
-
Click the OK button.
After you complete the steps, the custom firewall configurations will be overwritten by the default settings.
Reset firewall settings using PowerShell
To reset the Microsoft Defender Firewall using a PowerShell command, use these steps:
-
Open Start.
-
Search for PowerShell, right-click the top result, and select the Run as administrator option.
-
Type the following command to reset the Microsoft Default Firewall settings and press Enter:
(New-Object -ComObject HNetCfg.FwPolicy2).RestoreLocalFirewallDefaults()
Once you complete the steps, the PowerShell command will remove all the changes you made to the firewall since Windows 11 was installed.
Reset firewall settings using Command Prompt
To restore the default firewall settings with Command Prompt on Windows 11, use these steps:
-
Open Start.
-
Search for Command Prompt, right-click the top result, and select the Run as administrator option.
-
Type the following command to reset the built-in firewall settings and press Enter:
netsh advfirewall reset
After you complete the steps, the command will delete the current Windows 11 firewall settings, and the original settings will be restored on the computer.