How to Turn On or Off Microsoft Defender Firewall in Windows 10


Starting with Windows 10 build 16193, Windows Firewall has been renamed to Windows Defender Firewall, and now renamed to Microsoft Defender Firewall in Windows 10 version 2004 and higher.

Microsoft Defender Firewall is designed to help prevent hackers or malicious software from gaining access to your PC through the Internet or a network.

See also: Automatically diagnose and fix problems with Windows Firewall | Windows Support

This tutorial will show you different ways on how to turn on or off Microsoft Defender Firewall for network locations (profiles) in Windows 10.

You must be signed in as an administrator to turn on or off Microsoft Defender Firewall.

Microsoft Defender Firewall is turned on by default in Windows 10.

You shouldn't turn off Microsoft Defender Firewall unless you have another third party firewall installed and turned on. Turning off Microsoft Defender Firewall might make your PC (and your network, if you have one) more vulnerable to unauthorized access to your network.



Contents

  • Option One: To Turn On Microsoft Defender Firewall from Notification
  • Option Two:To Turn On Microsoft Defender Firewall in Control Panel
  • Option Three: To Turn Off Microsoft Defender Firewall in Control Panel
  • Option Four: To Turn On or Off Microsoft Defender Firewall in Command Prompt
  • Option Five: To Turn On or Off Microsoft Defender Firewall in PowerShell
  • Option Six: To Turn On or Off Microsoft Defender Firewall in Windows Security






OPTION ONE

To Turn On Microsoft Defender Firewall from Notification


1 Click/tap on the notification (if available) from Windows Security. (see screenshot below)

How to Turn On or Off Microsoft Defender Firewall in Windows 10-windows_security_notification-1.png

2 In Windows Security, click/tap on the Turn on button for Firewall & network protection to turn on Microsoft Defender Firewall for all network profiles. (see screenshot below)

How to Turn On or Off Microsoft Defender Firewall in Windows 10-windows_security_notification-2.png

3 Click/tap on Yes when prompted by UAC to approve.

4 You can now close Windows Security if you like.





OPTION TWO

To Turn On Microsoft Defender Firewall in Control Panel


1 Open the Control Panel (icons view), and click/tap on the Windows Defender Firewall icon.

2 Do step 3 or step 4 below for how you would like to turn on Windows Firewall.

3 Click/tap on the Use recommended settings button to turn on Windows Firewall for all network profiles. (see screenshot below)

How to Turn On or Off Microsoft Defender Firewall in Windows 10-turn_on_windows_firewall-1.png

4 Click/tap on the Turn Windows Defender Firewall on or off link on the left side. (see screenshot below)

How to Turn On or Off Microsoft Defender Firewall in Windows 10-turn_on_windows_firewall-2.png

A) Select (dot) Turn on Windows Defender Firewall for each network profile (ex: domain, private, or public) you want, and click/tap on OK. (see screenshot below)

How to Turn On or Off Microsoft Defender Firewall in Windows 10-turn_on_windows_firewall-3.png





OPTION THREE

To Turn Off Microsoft Defender Firewall in Control Panel


1 Open the Control Panel (icons view), and click/tap on the Windows Defender Firewall icon.

2 Click/tap on the Turn Windows Defender Firewall on or off link on the left side. (see screenshot)

How to Turn On or Off Microsoft Defender Firewall in Windows 10-turn_off_windows_firewall-1.png

3 Select (dot) Turn off Windows Defender Firewall for each network profile (ex: domain, private, or public) you want, and click/tap on OK. (see screenshot below)

How to Turn On or Off Microsoft Defender Firewall in Windows 10-turn_off_windows_firewall-2.png





OPTION FOUR

To Turn On or Off Microsoft Defender Firewall in Command Prompt


To see more usage options for the Netsh AdvFirewall Firewall command, see: Netsh AdvFirewall Firewall Commands - Microsoft Docs


1 Open an elevated command prompt.

2 Copy and paste the command below you want to use into the elevated command prompt, and press Enter. (see screenshots below)

(Turn on Windows Firewall for all network profiles)
netsh advfirewall set allprofiles state on


(Turn off Windows Firewall for all network profiles)
netsh advfirewall set allprofiles state off


(Turn on Windows Firewall for current network profile)
netsh advfirewall set currentprofile state on


(Turn off Windows Firewall for current network profile)
netsh advfirewall set currentprofile state off


(Turn on Windows Firewall for domain network profile)
netsh advfirewall set domainprofile state on


(Turn off Windows Firewall for domain network profile)
netsh advfirewall set domainprofile state off


(Turn on Windows Firewall for private network profile)
netsh advfirewall set privateprofile state on


(Turn off Windows Firewall for private network profile)
netsh advfirewall set privateprofile state off


(Turn on Windows Firewall for public network profile)
netsh advfirewall set publicprofile state on


(Turn off Windows Firewall for public network profile)
netsh advfirewall set publicprofile state off

How to Turn On or Off Microsoft Defender Firewall in Windows 10-turn_off_windows_firewall-command.png
How to Turn On or Off Microsoft Defender Firewall in Windows 10-turn_on_windows_firewall-command.png





OPTION FIVE

To Turn On or Off Microsoft Defender Firewall in PowerShell


To see more usage options for the Set-NetFirewallProfile command, see: Set-NetFirewallProfile - Microsoft Docs


1 Open an elevated PowerShell.

2 Copy and paste the command below you want to use into the elevated PowerShell, and press Enter. (see screenshots below)

(Turn on Windows Firewall for all network profiles)
Set-NetFirewallProfile -Enabled True


(Turn off Windows Firewall for all network profiles)
Set-NetFirewallProfile -Enabled False


(Turn on Windows Firewall for domain network profile)
Set-NetFirewallProfile -Profile Domain -Enabled True


(Turn off Windows Firewall for domain network profile)
Set-NetFirewallProfile -Profile Domain -Enabled False


(Turn on Windows Firewall for private network profile)
Set-NetFirewallProfile -Profile Private -Enabled True


(Turn off Windows Firewall for private network profile)
Set-NetFirewallProfile -Profile Private -Enabled False


(Turn on Windows Firewall for public network profile)
Set-NetFirewallProfile -Profile Public -Enabled True


(Turn off Windows Firewall for public network profile)
Set-NetFirewallProfile -Profile Public -Enabled False

How to Turn On or Off Microsoft Defender Firewall in Windows 10-turn_off_windows_firewall-powershell.png
How to Turn On or Off Microsoft Defender Firewall in Windows 10-turn_on_windows_firewall-powershell.png





OPTION SIX

To Turn On or Off Microsoft Defender Firewall in Windows Security


1 Open the Windows Security, and click/tap on the Firewall & network protection icon.

2 Click/tap on Domain network, Private network or Public network you want to turn on or off Microsoft Defender Firewall for. (see screenshot below)

How to Turn On or Off Microsoft Defender Firewall in Windows 10-windows_security-1.png

3 Turn on (default) or off Microsoft Defender Firewall for what you want, and click/tap on Yes when prompted by UAC to approve. (see screenshots below)

4 Check or uncheck (default) Blocks all incoming connections, including those in the list of allowed apps for what you want, and click/tap on Yes when prompted by UAC to approve. (see screenshots below)

5 When finished, you can close Windows Security if you like.

How to Turn On or Off Microsoft Defender Firewall in Windows 10-windows_security-2.png How to Turn On or Off Microsoft Defender Firewall in Windows 10-windows_security-3.png
How to Turn On or Off Microsoft Defender Firewall in Windows 10-windows_security-4.png


That's it,
Shawn