How to disable firewall on Windows 11

You can disable (or enable) the Microsoft Defender Firewall in several ways, and here's how on Windows 11.

Windows 11 disable Defender Firewall
Windows 11 disable Defender Firewall / Image: Mauro Huculak
  • 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.
  • You can also turn off the Windows 11 firewall from Command Prompt, PowerShell, Registry, or Group Policy.
  • When disabling the firewall, your computer will become vulnerable to attacks. You should always consider creating a rule to allow only specific apps through it.

On Windows 11, you can disable the Microsoft Defender Firewall in multiple ways, and in this guide, I’ll show you six different ways. 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 turning off the Windows 11 firewall is not recommended since it can make your device vulnerable, you may need to disable 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, and Registry. If you’re comfortable using commands, you can use PowerShell or Command Prompt, handy options for automation or scripting. Also, Group Policy is the recommended option for enterprise environments running Windows 11 Pro, Enterprise, and Education.

In this guide, I’ll teach how to disable (and re-enable) the built-in firewall on Windows 11.

Warning: This guide includes the option to require the use of the Registry. As a result, it’s crucial to note that modifying the Registry can cause serious problems if not used properly. It’s assumed you know what you’re doing and created a full backup of your system before proceeding.

Disable firewall on Windows 11 from Windows Security

To disable the firewall on Windows 11, use these steps:

  1. Open Windows Security on Windows 11.

  2. Click on Firewall & network protection.

  3. Click the active network option.

    Firewall and network protection

    Quick note: You can also navigate to Settings > Privacy & security > Windows Security > Firewall & network protection to access the same page.
  4. Turn off the “Microsoft Defender Firewall” toggle switch to disable the firewall.

    Windows 11 disable 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.”

Re-enable firewall through Windows Security

To enable the firewall on Windows 11, use these steps:

  1. Open Windows Security.

  2. Click on Firewall & network protection.

    Firewall and network protection

  3. Click the “Turn on” button from the network profile. Or click the Restore settings button (if applicable).

    Windows 11 enable firewall

After you complete the steps, the Microsoft Defender Firewall will be enabled again on the computer.

Disable firewall on Windows 11 from Control Panel

To disable the Windows 11 firewall from the Control Panel, use these steps:

  1. Open Control Panel.

  2. Click on System and Security.

  3. Click on Windows Defender Firewall.

    Windows Defender Firewall

  4. Click the “Turn Windows Defender Firewall on or off” option from the left pane.

    Control Panel customize firewall settings

  5. Select the “Turn off Windows Defender Firewall” option under the “Private network settings” section.

  6. Select the “Turn off Windows Defender Firewall” option under the “Public network settings” section.

    Control Panel disable firewall

  7. Click the OK button.

Once you complete the steps, the firewall will no longer protect the device from malicious connections.

Re-enable firewall through Control Panel

To re-enable the firewall with Control Panel, use these steps:

  1. Open Control Panel.

  2. Click on System and Security.

  3. Click on Windows Defender Firewall.

    Windows Defender Firewall

  4. Click the “Turn Windows Defender Firewall on or off” option from the left pane.

    Control Panel customize firewall settings

    Quick tip: Click the “Use recommended settings” button to enable the firewall for all network profiles.
  5. Select the “Turn on Windows Defender Firewall” option under the “Private network settings” section.

  6. Select the “Turn on Windows Defender Firewall” option under the “Public network settings” section.

    Control Panel enable firewall

  7. Click the OK button.

After you complete the steps, the built-in firewall will be enabled on the computer.

Disable firewall on Windows 11 from Command Prompt

To disable the firewall from Command Prompt, use these steps:

  1. Open Start.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to turn off the firewall for the current network profile and press Enter:

    netsh advfirewall set currentprofile state off

    Command Prompt disable firewall

  4. (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
  5. (Optional) Type the following command to disable the firewall for the domain network profile and press Enter:

    netsh advfirewall set domainprofile state off
  6. (Optional) Type the following command to disable the firewall for the private network profile and press Enter:

    netsh advfirewall set privateprofile state off
  7. (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.

Re-enable firewall through Command Prompt

To enable the built-in firewall with Command Prompt on Windows 11, use these steps:

  1. Open Start.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to enable the firewall for the current network profile and press Enter

    netsh advfirewall set currentprofile state on

    Command Prompt enable firewall

  4. (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
  5. (Optional) Type the following command to enable the firewall for the domain network profile and press Enter:

    netsh advfirewall set domainprofile state on
  6. (Optional) Type the following command to enable the firewall for the private network profile and press Enter:

    netsh advfirewall set privateprofile state on
  7. (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.

Disable firewall on Windows 11 from PowerShell

To disable the Microsoft Defender Firewall with PowerShell commands on Windows 11, use these steps:

  1. Open Start.

  2. Search for PowerShell, right-click the top result, and select the Run as administrator option.

  3. Type the following command to disable the firewall for the current network profile and press Enter:

    Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False

    PowerShell disable firewall

    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.

Re-enable firewall through PowerShell

To enable the firewall with PowerShell commands, use these steps:

  1. Open Start.

  2. Search for PowerShell, right-click the top result, and select the Run as administrator option.

  3. Type the following command to enable the firewall for the current network profile and press Enter:

    Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True

    PowerShell enable firewall

    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.

Disable firewall on Windows 11 from Group Policy

To turn off the Windows 11 (Pro) firewall through the Local Group Policy Editor, use these steps:

  1. Open Start.

  2. Search for gpedit.msc and click the top result to open the Local Group Policy Editor.

  3. Open the following path:

    Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile
  4. Double-click to open the “Windows Defender Firewall: Protect all network connections” policy.

    Standard protection

  5. Check the Disabled option.

    Gpedit disable firewall

  6. Click the Apply button.

  7. Click the OK button.

  8. Restart the computer.

After you complete the steps, the computer will restart to apply the new settings that turn off the security feature.

Re-enable firewall through Group Policy

To turn on the Windows 11 firewall through the Local Group Policy Editor, use these steps:

  1. Open Start.

  2. Search for gpedit.msc and click the top result to open the Local Group Policy Editor.

  3. Open the following path:

    Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile
  4. Double-click to open the “Windows Defender Firewall: Protect all network connections” policy.

    Standard protection

  5. Check the Not configured option.

    Gpedit enable firewall

  6. Click the Apply button.

  7. Click the OK button.

  8. Restart the computer.

After you complete the steps, the computer will restart to enable the firewall.

Disable firewall on Windows 11 from Registry

To turn off the Windows 11 firewall through the Registry, use these steps:

  1. Open Start.

  2. Search for regedit and click the top result to open the Registry.

  3. Open the following path:

    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall
  4. Right-click the “WindowsFirewall” key, select the New menu, and choose the Key option.

  5. Name the key StandardProfile and press Enter.

  6. Right-click the “StandardProfile” key, select the New menu, and choose the “DWORD (32-bit) Value” option.

    Standard profile

  7. Name the EnableFirewall name and press Enter.

  8. Double-click the newly created key and make sure the value is set to “0”.

    Regedit disable firewall

  9. Click the OK button.

  10. Restart the computer.

Once you complete the steps, the firewall will be disabled after the device startup process.

Re-enable firewall through Registry

To turn on the Windows 11 firewall through the Registry, use these steps:

  1. Open Start.

  2. Search for regedit and click the top result to open the Registry.

  3. Open the following path:

    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile
  4. Right-click the EnableFirewall key and choose the Delete option.

    Regedit enable firewall

  5. Click the OK button.

  6. Restart the computer.

After you complete the steps, the system firewall will be enabled on Windows 11.

While disabling the firewall on Windows 11 can help with certain tasks, it’s important to weigh the potential security risks. If you disable this security feature, the device will become more vulnerable to unauthorized access, malware, and other security threats. As a result, always try to keep the firewall enabled and only disable it temporarily for specific, controlled scenarios.

If you encounter issues that require the firewall to be disabled, ensure you understand the implications and have other security measures to protect your system during that time. Instead of completely disabling the firewall, consider creating specific rules that allow certain apps or features through the firewall. This approach maintains a level of security while accommodating your specific needs.

If you’ve disabled the feature for troubleshooting or a specific task, remember to re-enable it as soon as you’re done to ensure your system is protected. (You can refer to the instructions outlined above.)

Update February 26, 2024: This guide has been updated to ensure accuracy and reflect changes to the process.

About the author

Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication. He has also been a Windows Central contributor for nearly a decade. Mauro has over 14 years of experience writing comprehensive guides and creating professional videos about Windows and software, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 20 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and About.me. Email him at [email protected].