How to Turn On or Off Microsoft Defender Firewall in Windows 11
Microsoft Defender Firewall in Windows 11 acts as your PC’s security guard, watching over network connections.
This built-in security feature blocks unwanted access from the internet or other networks, protecting you from online threats.
Windows 11 uses Microsoft Defender Firewall by default, and it helps keep your computer safe even when other security programs are running.
You might need to turn it off to troubleshoot network problems or install certain software that temporarily requires access. Administrator rights are needed to change these settings.
Open Windows Security, navigate to Firewall & network protection, select your network type, and toggle Microsoft Defender Firewall on or off. Alternatively, use Control Panel, Command Prompt, or PowerShell for adjustments.
Turn On or Off Microsoft Defender Firewall Using Windows Security
- Click the Start button and open Windows Security. You can type “Windows Security” in the search box.
- In Windows Security, click on Firewall & network protection.
- Choose the network type you want to change (Domain, Private, or Public). You’ll see which one is active next to it.
- Turn the switch On or Off for Microsoft Defender Firewall.
- If a confirmation box appears (User Account Control), click Yes.
- Close Windows Security when you’re done.

To manage the Windows 11 Defender Firewall with Windows Security, start by opening the app. Navigate to Firewall & network protection, choose your active network type, and then use the toggle switch.

To manage the Windows 11 Defender Firewall with Windows Security, start by opening the app. Navigate to Firewall & network protection, choose your active network type, and then use the toggle switch.

To manage the Windows 11 Defender Firewall with Windows Security, start by opening the app. Navigate to Firewall & network protection, choose your active network type, and then use the toggle switch.
Turn On or Off Microsoft Defender Firewall Using Control Panel
- Open the Control Panel. (Press ⊞ Win+R, type
control, and press Enter.) - Click on Windows Defender Firewall.
- On the left side, click Turn Windows Defender Firewall on or off.
- Choose to turn the firewall On or Off for Domain, Private, and Public networks.
- Click OK to save your changes.
- Close Control Panel if you want.

To manage your Windows 11 Defender Firewall using the Control Panel, press ⊞ Win+R, type ‘control’, and hit Enter. Next, click on Windows Defender Firewall, then select ‘Turn Windows Defender Firewall on or off’ from the left-hand menu. You can then choose to enable or disable the firewall for different network types.

To manage your Windows 11 Defender Firewall using the Control Panel, press ⊞ Win+R, type ‘control’, and hit Enter. Next, click on Windows Defender Firewall, then select ‘Turn Windows Defender Firewall on or off’ from the left-hand menu. You can then choose to enable or disable the firewall for different network types.
Turn On or Off Microsoft Defender Firewall Using Command Prompt
For those comfortable with it, the Command Prompt offers control over the Windows 11 Defender Firewall. Open Command Prompt as an administrator by right-clicking the Start button and choosing Windows Terminal (Admin). Then, you can type specific commands to enable or disable the firewall for your network.
- Open Windows Terminal (Admin):
- Right-click the Start button and choose Windows Terminal (Admin).
- When it opens, click the down arrow (˅) and select Command Prompt.
- Type or paste one of the commands below, then press Enter:
Enable Firewall for All Networks (Domain, Private, Public)
netsh advfirewall set allprofiles state onDisable Firewall for All Networks
netsh advfirewall set allprofiles state offEnable Firewall for Current (Active) Network
netsh advfirewall set currentprofile state onDisable Firewall for Current (Active) Network
netsh advfirewall set currentprofile state offEnable Firewall for Specific Network Type
- Domain:
netsh advfirewall set domainprofile state on - Private:
netsh advfirewall set privateprofile state on - Public:
netsh advfirewall set publicprofile state on
Disable Firewall for Specific Network Type
- Domain:
netsh advfirewall set domainprofile state off - Private:
netsh advfirewall set privateprofile state off - Public:
netsh advfirewall set publicprofile state off
After running the commands, close Windows Terminal.
Turn On or Off Microsoft Defender Firewall Using PowerShell
For advanced control and automation, you can manage your Windows 11 Defender Firewall using PowerShell. Open Windows Terminal (Admin) and select Windows PowerShell. Then, you can type or paste specific commands to enable or disable the firewall for all network profiles.
- Open Windows Terminal (Admin) and select Windows PowerShell.
- Type or paste the commands below, then press Enter:
Enable Firewall for All Network Profiles
Set-NetFirewallProfile -All -Enabled TrueDisable Firewall for All Network Profiles
Set-NetFirewallProfile -All -Enabled FalseEnable Firewall for Specific Network Profile
- Domain:
Set-NetFirewallProfile -Profile Domain -Enabled True - Private:
Set-NetFirewallProfile -Profile Private -Enabled True - Public:
Set-NetFirewallProfile -Profile Public -Enabled True
Disable Firewall for Specific Network Profile
- Domain:
Set-NetFirewallProfile -Profile Domain -Enabled False - Private:
Set-NetFirewallProfile -Profile Private -Enabled False - Public:
Set-NetFirewallProfile -Profile Public -Enabled False
When you’re done, close Windows Terminal.
Summary
- Why use the Firewall? It stops hackers and harmful software from reaching your PC.
- Easy to Use: You can turn it on or off through Windows Security, Control Panel, Command Prompt, or PowerShell.
- Different Networks: Firewall settings can be different for your home, work, or public Wi-Fi.
- Admin Rights Needed: Only users with admin access can change firewall settings.
- Stay Protected: It’s best to keep the firewall turned on for your safety.
The Windows 11 Defender Firewall is important for protecting your PC from hackers and harmful software. You can manage the firewall through Windows Security, Control Panel, Command Prompt, or PowerShell. Settings can be adjusted for different network types, but administrator access is required to make changes.
Is the Windows Defender Firewall included in 🪟 Windows 11?
Windows 11 devices feature Windows Security, which includes Microsoft Defender Antivirus, protecting you from viruses and malware.
How to enable Windows Defender Firewall in 🪟 Windows 11?
Here you can see the Control Panel on the right side. Clicking on either option opens a small dialogue box.
Does Microsoft Defender have a built-in firewall?
Windows Defender Firewall is software built into Windows that controls which network traffic is allowed, or blocked, from passing to or from your computer across the network. Windows Defender Firewall is enabled by default.
Was this guide helpful?
About the Author
Richard
Tech Writer, IT Professional
Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.
No comments yet — be the first to share your thoughts!