Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / Windows 11 / How to Enable or Disable Windows Defender Firewall

October 22, 2025

How to Enable or Disable Windows Defender Firewall

All modern versions of Windows come with a built-in firewall called Windows Defender Firewall. This built-in software firewall monitors and filters incoming and outgoing network traffic to protect Windows from unauthorized external access and controls the network activity of installed programs. Windows Defender Firewall is enabled by default and protects all network interfaces on a computer. The default behavior of Windows Defender Firewall is to block all incoming connections unless they are explicitly allowed by rules, while allowing all outgoing connections.

Contents:
  • Disable or Enable Windows Firewall using Settings App or Control Panel
  • How to Disable Windows Firewall via Group Policy
  • Turn the Windows Firewall On or Off with PowerShell

In most cases, Windows Firewall should be enabled to protect a computer from network threats. To grant access to a computer for a specific service or IP address, simply create an allow rule. In some cases, an administrator may need to disable the Windows Defender Firewall completely, for example, to troubleshoot or debug network connections. This post will explain how to disable and enable the built-in Windows Defender Firewall using several different methods.

Disable or Enable Windows Firewall using Settings App or Control Panel

In Windows 11, the firewall is managed via the Windows Security app.

If the Windows Security app won’t open or is corrupted, you can repair it.
  1. Go to Settings -> Update & Security -> Windows Security or run the command windowsdefender://network/
  2. Select Firewall and network protection Disable Windows Firewall in Windows 11 using Settings app
  3. Click each of the three network profiles (Domain, Private, and Public) one by one, and disable Microsoft Defender Firewall for each disable Microsoft Defender Firewall for network profile
  4. Confirm that you want to disable the firewall in the User Account Control prompt.
In Windows, each network connection is assigned to one of three network profiles.

  • Domain – used for computers that are joined to an Active Directory domain
  • Private – for office LANs, workgroups, and home networks
  • Public – for public networks (cafes, airports)

Different firewall rules and Windows Network Discovery settings are applied to a network interface based on the assigned network type. You can change the network profile (location) for a connection as described here.

In previous versions of Windows (10, 8.1, 7) and in Windows Server 2012 R2/2016/2019, administrators could disable the firewall using the Windows Firewall with Advanced Security applet in the classic Control Panel.

  1. Open the Windows Firewall settings by running firewall.cpl
  2. Click Turn Windows Defender Firewall on or offTurn Windows Defender Firewall on or off
  3. Disable Windows Defender Firewall for all network profile types. Turn off windows firewall for each network type

If your computer has multiple network adapters, it is possible to disable the Windows Defender Firewall for only some of them.

  1. Go to Advanced Settings and click Windows Defender Firewall Properties Windows Defender Firewall Properties
  2. Each network profile has a settings section called Protected network connections. Click on the Customize button.
  3. Uncheck the network interfaces for which you want to disable the firewall. Disable the Windows firewall for just one network adapter
  4. Disable firewall protection for network interfaces in the settings of other network profiles in the same way.

When the Windows Defender Firewall is disabled, a warning notification will appear in the system tray to alert users that their firewall is turned off

The "firewall is turned off" notification in Windows

To hide this pop-up warning, add the following registry value:

reg add "HKLM\Software\Microsoft\Windows Defender Security Center\Notifications" /v "DisableNotifications" /t REG_DWORD /d "1" /f

Note that Windows has a separate system service called Windows Defender Firewall (mpsvc). Disabling or pausing the Windows Firewall service alone does not turn off the firewall; you must manually disable protection for each network profile to fully deactivate it.

Windows Defender Firewall service

However, you can disable the built-in Windows Defender antivirus by stopping its services.

How to Disable Windows Firewall via Group Policy

An administrator can disable the Windows Defender Firewall using Group Policy (GPO).

On a standalone computer, use the Local Group Policy Editor console (gpedit.msc). In an Active Directory domain environment, you need to create a new GPO using the Group Policy Management snap-in (gpmc.msc).

  1. Open the Group Policy editor and navigate to Computer Configuration -> Administrative Templates -> Network -> Network Connections -> Windows Firewall -> Domain Profile.
  2. Open the Windows Firewall: Protect all network connections option and change it to Disabled GPO option: Windows Firewall: Protect all network connections
  3. Similarly, change the same GPO option in the Standard Profile section
  4. Update the GPO settings on the computer and ensure that the Firewall is disabled for a domain profile. Firewall is disable via GPO
  5. When a computer is connected to a non-domain network (public or private), the Windows Firewall will protect the connection using the appropriate network profile.
  6. If you want to disable the firewall for all network profiles, go to the Computer Configuration -> Windows Settings -> Security Settings -> Windows Firewall with Advanced Security. Set the firewall state to Off on each of the three network profile tabs. Disable firewall for a specific network profile via GPO
You can also use Group Policy to manage Windows Defender Firewall rules and other settings.

If an administrator disables the Windows Firewall via a GPO, users won’t be able to manually enable it using the Control Panel or Settings app.

Turn the Windows Firewall On or Off with PowerShell

Built-in PowerShell cmdlets can be used to manage the Windows Firewall via the command prompt.

Check if the Windows Defender Firewall is enabled for all three network profiles:

Get-NetFirewallProfile | Format-Table Name, Enabled

Get-NetFirewallProfile state

It is only possible to disable the firewall for one network profile:

Set-NetFirewallProfile -Profile Domain -Enabled False

Or disable the firewall for all network profiles at once:

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

PowerShell - disable Windows Firewall

To turn the Windows Defender Firewall on, run the command:

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

It is possible to disable firewall protection for a specific network connection. To find out the name of a network connection, list them:

Get-NetAdapter

Learn more about managing network settings using PowerShell.

Now you can disable the firewall for the specific network interface:

Set-NetFirewallProfile -Profile Domain, Public, Private -DisabledInterfaceAliases "Ethernet_NIC1"

List the network adapters excluded from firewall protection:

Get-NetFirewallProfile | select Name,Enabled,DisabledInterfaceAliases

Get-NetFirewallProfile

Clear the firewall’s network adapter exclusion list.

Set-NetFirewallProfile -Profile Domain,Public,Private -DisabledInterfaceAliases @()

Check how to configure Windows Defender Firewall rules using PowerShell.
0 comment
0
Facebook Twitter Google + Pinterest
Group PoliciesQuestions and AnswersWindows 10Windows 11Windows Server 2022
previous post
Stop Windows Server from Auto-Shutdown Every Hour

Related Reading

Configuring RemoteApps Hosted on Windows 10/11 (without Windows...

January 25, 2025

Bridging Multiple Network Interfaces on Windows

November 21, 2024

Fix: Windows Update Tab (Button) is Missing from...

December 16, 2024

How to Prefer IPv4 over IPv6 in Windows...

April 15, 2025

How to Detect Which User Installed or Removed...

June 25, 2025

Find a Process Causing High Disk Usage on...

July 16, 2025

Change BIOS from Legacy to UEFI without Reinstalling...

April 23, 2025

Map a Network Drive over SSH (SSHFS) in...

May 13, 2025

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • How to Delete a Windows Service via CMD or PowerShell

    October 16, 2025
  • Resource Fair Sharing in Windows Server Remote Desktop Services (RDS)

    October 6, 2025
  • How to Disable (Enable) Credential Guard in Windows 11

    October 6, 2025
  • Wrong Network Profile on Windows Server after Reboot

    September 30, 2025
  • How to Get Windows 10 Extended Security Updates After End-Of-Life

    September 24, 2025
  • Blocking NTLM Connections on Windows 11 and Windows Server 2025

    September 23, 2025
  • Windows Stucks at ‘Getting Windows Ready, Don’t Turn Off Computer’

    September 15, 2025
  • Clean Up ETL Log Files in ProgramData

    September 9, 2025
  • Fix: Slow Startup of PowerShell Console and Scripts

    September 3, 2025
  • DPI Scaling and Font Size in RDP (RDS) Session

    August 27, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Remove ‘Some Settings are Managed by Your Organization’ on Windows 11 or 10
  • How to Add or Remove Pinned Folders to Quick Access with PowerShell and GPO
  • Mapping SharePoint Online Library as Network Drive in Windows
  • Prevent Server Manager from Starting at Logon on Windows Server
  • Configure NTP Time Source for Active Directory Domain
  • Configure File and Folder Access Auditing on Windows (GPO)
  • Unlocking Active Directory User Accounts
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top