- To disable the firewall on Windows 11, open Windows Security > Firewall & network protection, choose the active network, and turn off the Microsoft Defender Firewall.
- Alternatively, open Control Panel > System and Security > Windows Defender Firewall, choose the “Turn Windows Defender Firewall on or off” option and disable the Windows 11 firewall.
- In addition, you can always manage the Microsoft Defender Firewall from Command Prompt, PowerShell, Registry, or Group Policy.
On Windows 11, you can disable the Microsoft Defender Firewall in multiple ways, and in this guide, we’ll show you how. The Microsoft Defender Firewall is the system’s built-in firewall designed to monitor incoming and outgoing network traffic to allow or block connections based on predefined rules to protect your computer and information from unauthorized access.
While it’s not recommended to turn off the Windows 11 firewall since it can make your device vulnerable, you may need to turn off the protection for various reasons. For example, you are troubleshooting a network problem, testing an application over the network, or when you want to use another security application.
Regardless of the reason, Windows 11 lets you turn off the firewall in at least six ways using the Windows Security app, Control Panel, Command Prompt, PowerShell, Group Policy, and Registry.
In this guide, you will learn how to disable (re-enable) the built-in firewall on Windows 11.
Turn off firewall on Windows 11 from Windows Security
To disable the firewall on Windows 11, use these steps:
-
Open Windows Security on Windows 11.
-
Click on Firewall & network protection.
-
Click the active network option.
-
Turn off the “Microsoft Defender Firewall” toggle switch to disable the firewall.
Once you complete the steps, the firewall will disable the active network profile. If you want to turn off the firewall for all networks, turn off the security feature for all the profiles, including “Domain network,” “Private network,” and “Public network.”
Enable firewall using Windows Security
To enable the firewall on Windows 11, use these steps:
-
Open Windows Security on Windows 11.
-
Click on Firewall & network protection.
-
Click the “Turn on” button from the network profile. Or click the Restore settings button (if applicable).
After you complete the steps, the Microsoft Defender Firewall will enable again on the computer.
Turn off firewall on Windows 11 from Control Panel
To disable the Windows 11 firewall from Control Panel, use these steps:
-
Open Control Panel.
-
Click on System and Security.
-
Click on Windows Defender Firewall.
-
Click the “Turn Windows Defender Firewall on or off” option from the left pane.
-
Select the “Turn off Windows Defender Firewall” option under the “Private network settings” section.
-
Select the “Turn off Windows Defender Firewall” option under the “Public network settings” section.
-
Click the OK button.
Once you complete the steps, the firewall will no longer protect the device from malicious connections.
Enable firewall using Control Panel
To re-enable the firewall with Control Panel, use these steps:
-
Open Control Panel.
-
Click on System and Security.
-
Click on Windows Defender Firewall.
-
Click the “Turn Windows Defender Firewall on or off” option from the left pane.
Quick tip: You can also click the “Use recommended settings” button to enable the firewall for all network profiles.
-
Select the “Turn on Windows Defender Firewall” option under the “Private network settings” section.
-
Select the “Turn on Windows Defender Firewall” option under the “Public network settings” section.
-
Click the OK button.
After you complete the steps, the built-in firewall will enable on the computer.
Turn off firewall on Windows 11 from Command Prompt
To disable the firewall from Command Prompt, 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 turn off the firewall for the current network profile and press Enter:
netsh advfirewall set currentprofile state off
-
(Optional) Type the following command to disable the Defender Firewall for all network profiles (domain, private, and public) and press Enter:
netsh advfirewall set allprofiles state off
-
(Optional) Type the following command to disable the firewall for the domain network profile and press Enter:
netsh advfirewall set domainprofile state off
-
(Optional) Type the following command to disable the firewall for the private network profile and press Enter:
netsh advfirewall set privateprofile state off
-
(Optional) Type the following command to disable the firewall for the public network profile and press Enter:
netsh advfirewall set publicprofile state off
After you complete the steps, the firewall will turn off in the network profiles you specified.
Enable firewall using Command Prompt
To enable the built-in firewall with Command Prompt, 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 enable the firewall for the current network profile and press Enter:
netsh advfirewall set currentprofile state on
-
(Optional) Type the following command to enable the firewall for all network profiles (domain, private, and public) and press Enter:
netsh advfirewall set allprofiles state on
-
(Optional) Type the following command to enable the firewall for the domain network profile and press Enter:
netsh advfirewall set domainprofile state on
-
(Optional) Type the following command to enable the firewall for the private network profile and press Enter:
netsh advfirewall set privateprofile state on
-
(Optional) Type the following command to enable the firewall for the public network profile and press Enter:
netsh advfirewall set publicprofile state on
Once you complete the steps, the firewall will turn on for the specified network profiles.
Turn off firewall on Windows 11 from PowerShell
To disable the Microsoft Defender Firewall with PowerShell Commands, 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 disable the firewall for the current network profile and press Enter:
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False
Quick tip: To disable the firewall for a specific profile, you can remove the profile name (Domain, Public, or Private) from the command. For example,
Set-NetFirewallProfile -Profile Private -Enabled False
.
After you complete the steps, the system firewall will turn off on the device.
Enable firewall using PowerShell
To enable the firewall with PowerShell commands, 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 enable the firewall for the current network profile and press Enter:
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True
Quick tip: To enable the firewall for a specific profile, you can remove the profile name (Domain, Public, or Private) from the command. For example,
Set-NetFirewallProfile -Profile Private -Enabled True
.
Once you complete the steps, the firewall will allow or deny network access, depending on the configured rules.
Turn off firewall on Windows 11 from Group Policy
To turn off the Windows 11 (Pro) firewall through the Local Group Policy Editor, use these steps:
-
Open Start.
-
Search for gpedit.msc and click the top result to open the Local Group Policy Editor.
-
Open the following path:
Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile
-
Double-click to open the “Windows Defender Firewall: Protect all network connections” policy.
-
Check the Disabled option.
-
Click the Apply button.
-
Click the OK button.
-
Restart the computer.
After you complete the steps, the computer will restart to apply the new settings.
Enable firewall using Group Policy
To turn on the Windows 11 firewall through the Local Group Policy Editor, use these steps:
-
Open Start.
-
Search for gpedit.msc and click the top result to open the Local Group Policy Editor.
-
Open the following path:
Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile
-
Double-click to open the “Windows Defender Firewall: Protect all network connections” policy.
-
Check the Not configured option.
-
Click the Apply button.
-
Click the OK button.
-
Restart the computer.
After you complete the steps, the computer will restart to enable the firewall.
Turn off firewall on Windows 11 from Registry
To turn off the Windows 11 (Pro) firewall through the Local Group Policy Editor, use these steps:
-
Open Start.
-
Search for regedit and click the top result to open the Registry.
-
Open the following path:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile
-
Right-click the “StandardProfile” key, select the New menu, and choose the “DWORD (32-bit) Value” option.
-
Name the EnableFirewall name and press Enter.
-
Double-click the newly created key and make sure the value is set to “0”.
-
Click the OK button.
-
Restart the computer.
Once you complete the steps, the firewall will be disabled after the device startup process.
Enable firewall using Registry
To turn on the Windows 11 firewall through the Registry, use these steps:
-
Open Start.
-
Search for regedit and click the top result to open the Registry.
-
Open the following path:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile
-
Right-click the EnableFirewall key and choose the Delete option.
-
Click the OK button.
-
Restart the computer.
After you complete the steps, the system firewall will enable on Windows 11.