How to Turn On or Off Microsoft Defender Firewall in Windows 11
You can turn Microsoft Defender Firewall on or off in Windows 11 to manage your PC’s security.
Microsoft Defender Firewall is a built-in security feature. It watches over network traffic, blocking unwanted access and stopping malicious software from getting onto your computer.
Knowing how to toggle it is essential for troubleshooting network issues. It’s also helpful when installing specific software that needs temporary firewall adjustments. For instance, Windows 11 uses this firewall by default to protect against threats.
This guide shows you the steps to disable or re-enable your firewall in a few clicks.
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.
What is Microsoft Defender Firewall?
Microsoft Defender Firewall is a built-in security tool for Windows 11 that acts like a guard for your computer, stopping unwanted access from the internet or other networks.
- Domain network: Usually at work or school. Your device connects to a special system that controls access.
- Private network: Your home or a trusted network.
- Public network: Public Wi-Fi spots like cafes, airports, or hotels. Security needs to be higher here.
Keep the firewall on to stay safe. This is true even if you use other security programs.
Important: You need admin rights to change firewall settings.
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.

You can easily turn the Windows 11 Defender Firewall on or off using the Windows Security app, which you can find by searching for it in the Start menu.

You can easily turn the Windows 11 Defender Firewall on or off using the Windows Security app, which you can find by searching for it in the Start menu.

You can easily turn the Windows 11 Defender Firewall on or off using the Windows Security app, which you can find by searching for it in the Start menu.
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 turn your Windows 11 Defender Firewall on or off using the Control Panel, first open it by pressing the Windows key + R, typing ‘control’, and pressing Enter.

To turn your Windows 11 Defender Firewall on or off using the Control Panel, first open it by pressing the Windows key + R, typing ‘control’, and pressing Enter.
Turn On or Off Microsoft Defender Firewall Using Command Prompt
Advanced users can turn the Windows 11 Defender Firewall on or off using Command Prompt, but you’ll need to open it with administrator rights first.
- 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:
Turn On Firewall for All Networks (Domain, Private, Public)
netsh advfirewall set allprofiles state onTurn Off Firewall for All Networks
netsh advfirewall set allprofiles state offTurn On Firewall for Current (Active) Network
netsh advfirewall set currentprofile state onTurn Off Firewall for Current (Active) Network
netsh advfirewall set currentprofile state offTurn On 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
Turn Off 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
You can also turn the Windows 11 Defender Firewall on or off using PowerShell, which is great for automating tasks, by opening it as an administrator.
- Open Windows Terminal (Admin) and select Windows PowerShell.
- Type or paste the commands below, then press Enter:
Turn On Firewall for All Network Profiles
Set-NetFirewallProfile -All -Enabled TrueTurn Off Firewall for All Network Profiles
Set-NetFirewallProfile -All -Enabled FalseTurn On 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
Turn Off 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 because it stops hackers and harmful software from getting onto your computer, and you can easily manage its settings.
Is the Windows Defender Firewall included in 🪟 Windows 11?
Windows 11 devices feature Windows Security, including Microsoft Defender Antivirus, which protects you from viruses and malware.
How to enable Windows Defender Firewall in 🪟 Windows 11?
You can see right up top here here is control panel you got it off to the right side here you click on either one of them i’m going to click on that that opens up a little dialogue box here that is
Does Microsoft Defender have a built-in firewall?
Windows Defender Firewall is firewall 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 on 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!