On/Off

How to enable or disable firewall on Windows 10

Windows 10 lets you enable or disable the Windows Defender Firewall using multiple methods, and here's how to use them all.

Windows 10 enable or disable firewall

On Windows 10, the Windows Defender Firewall is a feature, which checks incoming and outgoing network traffic to allow or block traffic depending on predefined rules to protect your device from unauthorized access.

Although it’s recommended to keep the firewall enable, there are many reasons to disable it. For instance, if you want to use another firewall solution, you need to test a network or app connection, etc.

Whatever the reason it might be, Windows 10 allows you to disable as well as enable firewall using Windows Security, Control Panel, Command Prompt, and even PowerShell.

In this guide, you’ll learn the steps to enable (and disable) the built-in firewall on Windows 10.

How to enable firewall using Windows Security

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

  1. Open Windows Security.

  2. Click on Firewall & network protection.

  3. Click the Turn on button from the network profile. Or click the Restore settings button.

    Windows Security turn on firewall
    Windows Security turn on firewall

After you complete the steps, the Windows 10 firewall will enable again on your device.

How to disable firewall using Windows Security

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

  1. Open Windows Security on Windows 10.

  2. Click on Firewall & network protection.

  3. Click the active network option.

    Windows Security active network
    Windows Security active network
  4. Turn off the Windows Defender Firewall toggle switch.

    Windows Security disable Windows Defender Firewall
    Windows Security disable Windows Defender Firewall

Once you complete the steps, the firewall will be disabled the for the network profile you’re currently using. If you want to disable the firewall for all networks, make sure to turn off the security feature for all the profiles, including “Domain network,” “Private network,” and “Public network.”

How to enable firewall using Control Panel

To 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.

    Control Panel System and Security settings
    Control Panel System and Security settings
  4. Click the Turn Windows Defender Firewall on or off option from the left pane.

    Windows Defender Firewall settings
    Windows Defender 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.

    Windows Defender Firewall enable feature options
    Windows Defender Firewall enable feature options
  7. Click the OK button.

Alternatively, you can always click the Use the recommended settings button from the Windows Defender Firewall page.

How to disable firewall using Control Panel

To disable Windows Defender Firewall, use these steps:

  1. Open Control Panel.

  2. Click on System and Security.

  3. Click on Windows Defender Firewall.

    Control Panel System and Security settings
    Control Panel System and Security settings
  4. Click the Turn Windows Defender Firewall on or off option from the left pane.

  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.

    Windows Defender Firewall disable feature options
    Windows Defender Firewall disable feature options
  7. Click the OK button.

Once you complete the steps, the firewall will start to protect your computer from malicious connections.

How to enable firewall using Command Prompt

To enable the Windows 10 firewall 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 enable the firewall for the current network profile and press Enter

    netsh advfirewall set currentprofile state on

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

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

    netsh advfirewall set privateprofile state on
  7. (Optional) Type the following command to enable firewall for the public network profile and press Enter:

    netsh advfirewall set publicprofile state on

Once you complete the steps, the firewall will enable for the network profiles you specified.

How to disable firewall using Command Prompt

To disable the Windows 10 firewall 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 enable the firewall for the current network profile and press Enter:

    netsh advfirewall set currentprofile state off

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

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

    netsh advfirewall set privateprofile state off
  7. (Optional) Type the following command to enable firewall for the public network profile and press Enter:

    netsh advfirewall set publicprofile state off

After you complete the steps, the Windows 10 firewall will be disabled for the network profiles you specified.

How to enable firewall using PowerShell

To enable the Windows 10 firewall with PowerShell, 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 command
    PowerShell enable firewall command
    Quick tip: If you only want 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.

How to disable firewall using PowerShell

To disable the built-in firewall on Windows 10, 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 command
    PowerShell disable firewall command
    Quick tip: If you only want 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 Windows 10 firewall will be disabled on your device.