6 Ways to Disable Windows Firewall or Turn it Off For a Single Program

Deyan Georgiev
Deyan Georgiev

Updated · Jan 26, 2023

SHARE:

Techjury is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission. Learn more.

Windows Firewall is a security feature that protects your system from unauthorized access and disabling it is not recommended unless it is absolutely necessary.

If there is a legitimate reason, there are plenty of ways to disable Windows Firewall.

Here’s how to do that, how to turn it off for a single program, and how to enable it again.

Let’s dig in.

How to Disable Windows Firewall

If the built-in Windows Firewall is doing more harm than good, especially if there's another firewall program in place, here’s how you can disable the Windows Defender Firewall.

Windows Security App

The easiest way to disable the firewall on Windows 10 (version 1703 and later) is through the Windows Security app:

  1. Click Start and open Settings.

windows start menu with an arrow pointing at the settings icon

  1. Select Update & Security.
  2. Click on Windows Security from the left-side menu.
  3. Select Firewall & Network protection.

windows security settings with an arrow pointing at the firewall and network protection option

  1. There, you’ll find three network types: Domain Network, Private Network, and Public Network– all of which are protected by the Windows Firewall.
  2. To disable the Firewall on Windows, click on each of them and toggle the switch under Windows Defender Firewall.

microsoft defender firewall options with an arrow pointing at the toggle switch button

Windows Defender Firewall Control Panel

Disabling Windows Firewall is also possible via the Control Panel: 

  1. Click on Start, type in “Control Panel” and open it.
  2. Select System and Security.
  3. Click on Windows Defender Firewall.

control panel system and security settings with an arrow pointing at the windows defender firewall option

  1. Select Turn Windows Defender Firewall on or off from the left-side menu.

control panel windows defender firewall menu with an arrow pointing at the on and off option

  1. Check the box next to Turn off Windows Defender Firewall and click OK to save the changes. You can disable it for private and/or public networks. 

windows defender firewall customization settings with arrows pointing at the on and off boxes for both public nad private domains

NETSH Command-Line

In Windows, there is a command-line  for most GUI operations. If you know your way around, turning off the Windows Firewall can be quicker than using the GUI options. 

On top of that, Windows commands allow you to automate and script the task.

Disabling Firewall on Windows 10  can be done with the netsh advfirewall set command to turn off the firewall individually for separate networks or all network profiles:

  1. Click the Start button,  type in “Command Prompt,” right-click on the app, and select Run as administrator.

command prompt application in the start menu with an arrow pointing at the run as administrator option of the dropdown menu

  1. Type one of the following Windows commands to disable the firewall and press Enter:
  • netsh advfirewall set currentprofile state off : Disable the firewall for the network profile that is active or connected.
  • netsh advfirewall set allprofiles state off: Disable the firewall on all network profiles at once.
  • netsh advfirewall set domainprofile state off: The firewall will turn off for the domain network profile only.
  • netsh advfirewall set publicprofile state off: The firewall will be disabled for the public network profile only.
  • netsh advfirewall set privateprofile state off: Disable the firewall for the private network profile.

Set-NetFirewallProfile PowerShell cmdlet

Another way to turn the firewall off on Windows 10 is to use the built-in Net Security PowerShell cmdlet Set-NetFirewallProfile.

To use this cmdlet:

  1. Click the Start button. Type “PowerShell” to find the app, right-click on it, and select Run as administrator.

PowerShell in the start menu search bar with an arrow pointing at the dropdown menu run as administrator option

  1. Type one of the following commands to disable the Windows 10 firewall and press Enter:
  • Set-NetFirewallProfile- All- Enabled False: Disable Windows Firewall for all network profiles.
  • Set-NetFirewallProfile- Profile Private- Enabled False: Disable the firewall for the private network profile only.
  • Set-NetFirewallProfile- Profile Domain- Enabled False: Disable the firewall for the domain network profile only.
  • Set-NetFirewallProfile- Profile Public- Enabled False: Disable the firewall for the public network profile only.

Disable Windows Firewall Remotely With PowerShell

PowerShell also allows you to disable the Windows Firewall via remote access on one or more computers at once.

Note that this method will only work if the WinRM is enabled on the computer where you want to turn off the firewall.

If you need to disable the firewall on one remote computer you can use the Enter PsSession cmdlet and run the following command:

Enter PsSession - ComputerName desktop2

Set-NetFirewallProfile- All- Enabled False

If you need to disable Windows Firewall on more than one computer, you can use 

the Invoke - Command cmdlet instead:

$computers = @(“desktop2”)

$computers| ForEach - Object {

 Invoke - Command - ComputerName $_ {

   Set-NetFirewallProfile- All- Enabled False

By running this command Windows Firewall will be disabled for all network profiles on each specified computer.

Group Policy

System administrators can use Group Policy– which you can create on the Group Policy Management Console on the server – to disable Windows Firewall on selected or all computers in the domain.

To do that:

  1. Press the Windows key and the R key on your keyboard to open the Run command dialog box and type in the gpmc.msc command.

the windows Run application with gpmc.msc written in the open box

  1. In the Group Policy Management Console, expand the Domains folder and right-click on the domain where you want to create the Group Policy.
  2. Select Create GPO in this domain, and Link it here …
  3. In the New GPO dialog box type in Disable Windows Firewall, and click OK.
  4. Right-click on the New GPO and click Edit.
  5. In the Group Policy Management Editor expand these folders Computer Configuration>Policies>Administrative Templates>Network>Network Connections>Windows Defender>Firewall>Domain Profile.
  6. In the settings list on the right, double-click on Windows Defender Firewall: Protect all Network Connections to open its properties, then select Disabled and click OK.
  7. Go back and apply the same option to the Standard Profile settings.

You can apply the New GPO to the domain computers by doing the following:

  1. In the Group Policy Management select Disable Windows Firewall.
  2. Click the Add button under Security Filtering.
  3. In the Select User, Computer or Group dialog box search for Domain Computers and click OK.

The next time the client computers get the policy update, Windows Firewall will be disabled on every one of them.

How to Turn off Windows Firewall for a Single Program

Windows also lets users turn off the Windows Firewall for a specific program. 

To do that:

  1. Open the Start menu and go to Settings.
  2. Select Update & Security, click on Windows Security, and open the Firewall and Network Protection settings.
  3. Click on Allow an app through Windows Firewall.

firewall and network protection settings with an arrow pointing at the allow a program through the firewall option

  1. Click on Change Settings.

windows defender firewall allow apps menu with an arrow pointing at the change settings button of a highlighted application

  1. Locate the program you want to disable the firewall for and click on the checkbox next to it. You can also click on the app, select Remove, and then OK.

windows defender firewall allow through app menu with an arrow pointing at the remove button of a highlighted app

Note: Disabling the firewall for a program/ app doesn’t prevent it from running on Windows.

Disabling the Windows Defender Firewall can have detrimental consequences for your computer if you do not have a proper anti-malware replacement software, so make sure to check out our list of top anti-virus software choices.

Bottom Line

The Windows Defender Firewall is a tool that protects your computer from all types of network-based threats. But, sometimes, you may need to turn it off. There are many ways to disable Windows Firewall, including via the Windows Security App, a command line, and through a group policy, depending on what exactly you’re trying to turn off.

SHARE:

Deyan Georgiev

Deyan Georgiev

Deyan has been fascinated by technology his whole life. From the first Tetris game all the way to Falcon Heavy. Working for TechJury is like a dream come true, combining both his passions – writing and technology. In his free time (which is pretty scarce, thanks to his three kids), Deyan enjoys traveling and exploring new places. Always with a few chargers and a couple of gadgets in the backpack. He makes mean dizzying Island Paradise cocktails too.

Leave your comment

Your email address will not be published.