Skip to content
Windows

How to Reset Default Firewall Settings in Windows 11

Richard
Written by
Richard
Updated 9 min read
How to Reset Default Firewall Settings in Windows 11
How to Reset Default Firewall Settings in Windows 11
Before you start
  • 4 ways to do it
  • Needs administrator rights

Resetting the firewall in Windows 11 clears all custom rules and returns Microsoft Defender Firewall (the built-in security tool that blocks or lets apps connect to your local network and the internet) to its default settings. A reset helps when custom rules stop your games, printers or apps from working properly. The steps apply to currently supported versions of Windows 11 (25H2 or 26H2).

This tutorial covers four ways to do it: the Windows Security app, the Advanced Security console, Command Prompt and PowerShell. All four give the same result, so pick the one you are comfortable with.

⚡ Quick Answer

To reset the firewall in Windows 11, open Windows Security, select Firewall & network protection, then click Restore firewalls to default and confirm. This deletes all custom firewall rules and returns Microsoft Defender Firewall to its original settings, with no restart needed. Back up your rules first, because the reset cannot be undone. Administrator rights are required.

Advertisement

What is Windows Firewall?

Microsoft Defender Firewall acts like a security guard for your computer, blocking unwanted access from the internet or your network. A reset deletes every rule added over time, whether you made it or an app installer did. It also puts the Domain, Private and Public network profiles (the three sets of firewall settings, one for each type of network) back to their defaults. After the reset, the firewall is on and blocks unsolicited inbound connections.

💡TipCommon reasons to reset are accidentally blocking a safe app, changing a security rule by mistake, or seeing odd network behaviour that blocked traffic causes.

A reset removes the broken rules and puts protection back to its original state. If only one app is blocked, you can instead allow it through the firewall from the same Windows Security page, which leaves your other rules alone.

Advertisement

The Windows Security app is where you normally view and manage the firewall on Windows 11, and you can turn the firewall on or off there at any time. Turning it off is not a reset, because your rules stay in place. A restart is normally not needed after any of the reset methods below.

Before you start, note three things:

  • You need an administrator account. A standard account is asked for admin credentials or is blocked.
  • Apps that had their own rules, such as games, chat tools, remote desktop tools or file sharing, ask for permission again the next time they connect. Choose Allow for the ones you trust.
  • If you use a third-party security suite with its own firewall, Windows Security may say that program manages the firewall. Some options can then be missing or greyed out. The same applies to a work or school PC controlled by group policy (rules set centrally by an administrator), where the reset may be blocked. Turn off the other firewall or ask your IT team first.

Method 1Reset Firewall Using the Windows Security App

⚠️Warning

Back up your rules first. Every method in this guide deletes all custom firewall rules, and you cannot undo it afterwards. If you may want the current rules back, export the policy (a file holding all your rules) before you reset. The export steps are in the Advanced Security method below: open the console, then choose Action Export Policy and save the file somewhere safe.

The Windows Security app is the quickest way to reset the firewall without typing commands. It works the same on Home and Pro editions of a currently supported Windows 11 version (25H2 or 26H2), and you don’t need any advanced tools. Open Windows Security from Settings, go to the firewall page, and use the restore link at the bottom. No restart or sign-out is needed afterwards.

  1. Click the Start button. It sits in the centre of the taskbar with the default layout, or in the bottom-left corner if you moved the taskbar icons left. The Start menu opens.
  2. Click Settings (the gear icon). If you don’t see it, type “Settings” into the Start menu search box and open it from the results. The Settings window opens.
Windows 11 Start Menu with Settings
windows 11 start menu settings updated
  1. In the Settings window, click Privacy & security on the left side. Then click Windows Security. The Windows Security overview page appears on the right.
Windows Security button in Settings
Windows Security button in Settings
  1. Click the Open Windows Security button. A separate Windows Security window opens, with a list of protection areas on the left and a summary on the right.
Open Windows Security button
Open Windows Security button
  1. In the Windows Security app, click Firewall & network protection. To open this page directly, click here. You should see your three network profiles (Domain, Private and Public), with the one currently in use marked as active.
Firewall & network protection section
Windows 11 Security app showing Firewall and network protection section.
  1. Scroll down and click Restore firewalls to default. This link sits near the bottom of the page, below the links for allowing an app through the firewall and for advanced settings. If you can’t find it or it is greyed out, check whether another firewall product or a work policy is managing your PC.
Restore firewalls to default link
Restore firewalls to default link
  1. When the restore page or pop-up appears, click Restore defaults. This step deletes your custom rules and cannot be undone, so make sure you exported them first if you want to keep them.
  2. Click Yes if asked to confirm. This is the User Account Control prompt, which asks whether the app may make changes to your device. The reset runs straight away.
Restore defaults button
Restore defaults button
Advertisement

That’s it. Microsoft Defender Firewall now runs with its original settings, and the standard rules recommended by Microsoft protect your PC again.

Check that the firewall shows as on for your active network profile. Then test the app or device that was giving you trouble. If the app asks for firewall permission, choose Allow only if you trust it.

This method has no undo button. To get old rules back, recreate them or import a policy file you exported earlier from the Advanced Security console (see the next method).

Method 2Reset Firewall Using Advanced Security

Microsoft Defender Firewall with Advanced Security gives you deeper control over your network rules. This management console is built into Home and Pro editions of a currently supported Windows 11 version (25H2 or 26H2). It lets you restore the default policy directly, and it can also save your current rules to a file first.

Open it from the Run box, restore the default policy from the right-hand pane, and confirm. Restoring the default policy deletes all custom rules and cannot be undone. Before step 4, click Action in the menu bar, choose Export Policy and save the file somewhere safe. Later, use Action Import Policy to bring those rules back.

  1. Press Win+R on your keyboard to open the Run box. A small Run window appears at the bottom-left of the screen.
  2. Type wf.msc and press Enter. Approve the User Account Control prompt if one appears. The firewall console opens.
  3. In the console window, click Microsoft Defender Firewall with Advanced Security on Local Computer on the left side. Some builds still show the older name, Windows Defender Firewall with Advanced Security. This is the top item in the left pane, and its overview appears in the middle. Export your policy now if you want a backup.
  4. On the right side, in the Actions pane, click Restore Default Policy. A warning appears saying that all firewall policy changes made since Windows was installed will be lost.
  5. Click Yes on any pop-ups that appear to confirm. The console refreshes and your custom inbound and outbound rules disappear, leaving only the default Windows rules.
Restore default policy in Advanced Security
Restore default policy in Advanced Security

That’s it. The firewall policy is back to the Windows defaults, and your custom inbound and outbound rules are gone. If you exported a policy first, you can restore it with Action Import Policy.

Method 3Reset Firewall Using Command Prompt

Command Prompt resets the firewall with a single command, as long as it runs with administrator rights. People most often get that part wrong. Without elevation (running with administrator permission), the command fails with an access-denied message.

The reset deletes all custom rules and cannot be undone, so export your policy from the Advanced Security console first if you want a copy. Open the terminal as administrator, run the reset command, and the firewall returns to defaults. This is the fastest text-based method, and it works on both Home and Pro editions of a currently supported Windows 11 version (25H2 or 26H2).

One line of text handles the whole reset. That also suits remote sessions and scripts, since there are no windows to click through.

Advertisement
  1. Right-click the Start button and select Windows Terminal (Admin). On some newer builds of Windows 11 this entry is labelled Terminal (Admin). Click Yes on the User Account Control prompt. A terminal window opens.
  2. If needed, click the down arrow at the top and select the Command Prompt tab. If the terminal already opened in Command Prompt, skip this step. The prompt should show a path such as 📁C:\Windows\System32.
  3. Type the following command and press Enter:
    💻Code
    (New-Object -ComObject HNetCfg.FwPolicy2).RestoreLocalFirewallDefaults()

You should now have a firewall back at its default settings, with all custom rules cleared. The command often prints nothing and returns to the prompt, which is normal. To confirm, open Firewall & network protection in Windows Security and check that the firewall is on for your active network.

Summary

To get your old rules back, open Microsoft Defender Firewall with Advanced Security and choose Action Import Policy with the file you exported before the reset. Without an exported file, you have to recreate the rules by hand. Some apps ask for firewall permission the first time they connect, so choose Allow only for ones you trust. If a program is still blocked, check whether a third-party firewall or a work policy manages the firewall on that PC.

Have a question about this guide?

Answered by AI from this guide. Good questions may be added to this page — please don't include personal details.

Tags: #Windows 11

Did this guide fix your problem?

Richard

About the Author

Richard

Tech Writer, IT Professional

Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.

Advertisement

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked * How we handle comments