Get rid of it

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

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 built-in firewall that has been 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 you should always have the Windows 11 firewall enabled, 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 disable the firewall in at least four ways using the Windows Security app, Control Panel, Command Prompt, and PowerShell.

In this guide, you will learn how to disable (re-enable) the built-in firewall on Windows 11.

Disable firewall using Windows Security on Windows 11

To disable the firewall through Windows Security, use these steps:

  1. Open Windows Security on Windows 11.

  2. Click on Firewall & network protection.

  3. Click the active network option.

    Firewall & network protection

  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 in the active network profile. If you want to disable 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:

  1. Open Windows Security on Windows 11.

  2. Click on Firewall & network protection.

    Firewall & 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 enable again on the computer.

Disable firewall using Control Panel on Windows 11

To disable the Windows 11 firewall, 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. Under the “Private network settings” section, select the Turn off Windows Defender Firewall option.

  6. Under the “Public network settings” section, select the Turn off Windows Defender Firewall option.

    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.

Enable firewall using 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: You can also click the Use recommended settings button to enable the firewall for all network profiles.
  5. Under the “Private network settings” section, select the Turn on Windows Defender Firewall option.

  6. Under the “Public network settings” section, select the Turn on Windows Defender Firewall option.

    Control Panel enable firewall

  7. Click the OK button.

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

Disable firewall using Command Prompt on Windows 11

To disable the firewall on Windows 11 using 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 disable 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.

Enable firewall using Command Prompt

To enable the built-in firewall with 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 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 network profiles you specified.

Disable firewall using PowerShell on Windows 11

To disable the Defender 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 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 Defender Firewall will turn off on the device.

Enable firewall using 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.