How to disable firewall on Windows 10

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

Windows 10 Microsoft Defender Firewall
Windows 10 Microsoft Defender Firewall
  • To disable the Windows 10 firewall, open Windows Security > Firewall & network protection, select the network profile (“Private network” or “Public network”), and turn off the “Microsoft Defender Firewall” toggle switch.
  • To re-enable it turn on the “Microsoft Defender Firewall” toggle switch.
  • Other methods include using the Control Panel and using commands with PowerShell and Command Prompt.

On Windows 10, you can disable the Microsoft Defender Firewall in at least four ways through the Windows Security app, Control Panel, Command Prompt, and even PowerShell, and this guide will teach you how.

The Microsoft Defender Firewall is a feature that 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 not safe to disable the firewall, you may still have many reasons to do it. For example, when you want to use another firewall solution or have to test a network or app connection.

This guide will teach you the steps to enable (and disable) the built-in firewall on Windows 10.

Disable Microsoft Defender Firewall on Windows 10

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

  1. Open Start on Windows 10.

  2. Search for Windows Security and click the top result to open the app.

  3. Click on Firewall & network protection.

  4. Choose the network to disable the firewall.

    Firewall and network protection settings

  5. Turn off the “Microsoft Defender Firewall” toggle switch to disable the windows 10 firewall.

    Disable Defender Firewall

Once you complete the steps, the firewall will be disabled 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.”

Re-enable firewall 

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

  1. Open Start on Windows 10.

  2. Search for Windows Security and click the top result to open the app.

  3. Click on Firewall & network protection.

  4. Click the “Turn on” button from the network profile to enable the Windows 10 firewall. (Or click the Restore settings button.)

    Enable Defender Firewall

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

Disable Microsoft Defender Firewall from Control Panel

To disable Microsoft Defender Firewall on Windows 10 through Control Panel, use these steps:

  1. Open Control Panel.

  2. Click on System and Security.

  3. Click the Windows Defender Firewall option.

    Windows Defender Firewall in Control Panel

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

    Open firewall settings

  5. Under the “Private network settings” section, choose the “Turn off Microsoft Defender Firewall” option to disable the firewall for the private network.

  6. Under the “Public network settings” section, choose the “Turn off Microsoft Defender Firewall” option to disable the firewall for the public network.

    Disable firewall in Control Panel

  7. Click the OK button.

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

Re-enable firewall from Control Panel

To enable the firewall from Control Panel, use these steps:

  1. Open Control Panel.

  2. Click on System and Security.

  3. Click on Windows Defender Firewall.

    Windows Defender Firewall in Control Panel

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

    Open 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, choose the “Turn on Microsoft Defender Firewall” option to enable the firewall for the private network.

  6. Under the “Public network settings” section, choose the “Turn on Microsoft Defender Firewall” option to enable the firewall for the public network.

    Enable firewall in Control Panel

  7. Click the OK button.

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

Disable Microsoft Defender Firewall from Command Prompt

To disable the Microsoft Defender Firewall with commands, 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

    Disable firewall with CMD

  4. (Optional) Type the following command to disable the firewall for all network profiles (domain, private, and public) on Windows 10 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 Windows 10 firewall will be disabled for your specified network profiles.

Re-enable firewall from 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

    Enable firewall with CMD

  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 enable the network profiles you specified.

Disable Microsoft Defender Firewall from PowerShell

To disable the firewall on Windows 10 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: 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.

Re-enable firewall from PowerShell

To enable the Windows 10 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: 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.

FAQ

Is it safe to disable the firewall on Windows 10?

No, it’s not safe to disable the firewall because you can open your computer to many online threats. 

Can I disable the firewall temporarily?

Yes, you can disable the firewall temporarily or permanently. You only have one choice when it comes to disabling this security feature. You should only disable the Microsoft Defender Firewall to troubleshoot problems or perform specific tasks. Otherwise, the feature should always be turned on.

About the author

Mauro Huculak is a Windows expert and the Editor-in-Chief who started Pureinfotech in 2010 as an independent online publication. He is also been a Windows Central contributor for nearly a decade. Mauro has over 12 years of experience writing comprehensive guides and creating professional videos about Windows, software, and related technologies, 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.