Skip to content
Follow
Windows 🟡 Intermediate

How to Restore Windows Firewall Settings to Default

Richard
Written by
Richard
Aug 9, 2021 Updated Oct 7, 2026 10 min read
How to Restore Firewall Settings in Windows 11
How to Restore Firewall Settings in Windows 11

Restoring Microsoft Defender Firewall (the built-in security program that stops unauthorized network traffic) to its original factory state clears out all custom rules in under 1 minute. The reset fixes connection problems where apps cannot reach the network because a stray block rule is in the way. It does not touch your personal files or apps.

Advertisement

You need administrator rights on your PC to complete this reset. This guide covers five ways to do it: Windows Security, Control Panel , Windows Defender Firewall with Advanced Security, Command Prompt and PowerShell. All five give the same result, so pick the one you are most comfortable with. In short, you open the firewall settings and choose the option to restore defaults, which wipes out any broken custom rules.

⚡ Quick Answer

To restore the Windows firewall, open Windows Security, select Firewall & network protection, then choose Restore firewalls to default under the Firewall & network protection page’s settings. This clears all custom firewall rules and returns Microsoft Defender Firewall to its original state. Your personal files and apps are not affected, but you need administrator rights.

Advertisement

Why Reset Your Firewall?

Resetting Microsoft Defender Firewall to its factory state fixes network problems caused by blocked apps and broken rules. It is worth trying when internet apps stop working after you change security settings, or when a trusted program suddenly cannot connect online for no obvious reason.

Firewall settings in Windows 11 sometimes go wrong. You may have changed a setting by accident, or a program may have altered the configuration without asking you. A bad rule can then block traffic it should allow, and apps start to misbehave.

Common signs include:

  • Some apps can’t connect to the internet.
  • You can’t see network printers or shared folders.
  • Your internet connection is slow or unreliable.
  • You get strange security warnings.

Restoring the firewall to its default settings clears all custom firewall rules and returns the firewall to the state Windows originally shipped with. This resolves most setup problems. It cannot be undone with a single click, so read the next section before you start.

Advertisement

Before You Start: A Little Preparation

Before you restore the Windows firewall, check that you are signed in with an administrator account. Also write down any custom rules you added for games or apps. The reset deletes all personal configurations, and you will have to recreate those rules afterward.

  • Administrator Access: You need administrator rights to do this. If you use a work computer, ask your IT department if this is allowed.
  • Custom Rules: If you made special rules to allow or block certain programs or connections, these will be deleted. Write down any important rules you might need to add again later. You can usually find these in the firewall's "Advanced Settings." If you want a full backup, open the Advanced Settings tool and use Action Export Policy to save your current rules to a file first.
  • Work/School Networks: If your computer is on a work or school network, your organization might have specific firewall rules. Resetting your computer's settings might cause those organization rules to be used again automatically.
  • Third-Party Security Software: If you use another firewall or a security suite with its own firewall, that program keeps its own rules. This reset only affects the Microsoft Defender Firewall.

Option 1Resetting Through Windows Security (The Easy Way)

This is the most common method for most Windows users. It uses the Windows Security app and needs no commands. It works the same on Windows 11 Home and Pro.

Step 1Open Windows Security

Start by opening the Windows Security app.

  1. Click the Search box on the taskbar.
  2. Type Windows Security.
  3. Select the Windows Security app from the results.

The Windows Security dashboard opens, showing tiles for each protection area. Select Firewall & network protection, either from the tile or from the list on the left.

Advertisement

Step 2Go to Firewall & network protection

The Firewall & network protection page controls all your firewall settings. It lists three network profiles: Domain network, Private network and Public network. The one currently in use is marked "active". From here you manage how Microsoft Defender Firewall protects your computer from unwanted network traffic.

Windows 11 Security app showing Firewall and network protection section.
Windows 11 Security app showing Firewall and network protection section.

The restore option sits at the bottom of the page, so you need to scroll.

  1. Scroll down on the Firewall & network protection screen until you reach the list of links at the bottom.
  2. Click Restore firewalls to default. It is a plain text link and easy to miss, so look carefully.

If you can't find the link, the page may be limited by a work or school policy, or a third-party security product may be managing your firewall.

Step 4Start the Reset Process

A new window opens and explains what a reset does. It states that the firewall will be restored to its original settings and that any rules or settings you added will be lost.

Advertisement
  1. Read the message.
  2. Click the Restore defaults button.

A confirmation prompt then appears.

Windows 11 Firewall settings showing option to restore to default.
Windows 11 Firewall settings showing option to restore to default.

Step 5Confirm Your Choice

  1. Click Yes on the warning prompt to finish the reset.

Your internet may drop for a few seconds while the network adapter applies the default settings. It reconnects on its own. No restart is required.

💡TipAfter the reset, your network connection may drop and come back.

This is normal. If an app still misbehaves, restart your computer so all changes are fully applied, and then test the app again.

Option 2Resetting via Control Panel (The Old Way)

If you are familiar with the older Control Panel, this method will feel natural. It works on all editions of Windows 11.

Advertisement

Step 1Open Control Panel

  1. Click the Search box on the taskbar.
  2. Type Control Panel.
  3. Select Control Panel from the results.
  4. In the top-right corner, click the View by drop-down and choose Large icons (or Small icons).

Control Panel now shows a flat list of icons instead of categories, which makes the security tools easier to find.

Step 2Find Windows Defender Firewall

  1. In the icon view, find Windows Defender Firewall.
  2. Click it.

The firewall overview window opens, showing the state of your private and public networks.

Step 3Access the Restore Defaults Option

  1. In the left-hand pane of the Windows Defender Firewall window, click Restore defaults.

The Restore Defaults page opens.

Step 4Confirm the Reset

This page is similar to the one in the Windows Security method. It explains what resetting the firewall does.

Advertisement
  1. Read the message.
  2. Click the Restore defaults button.

Step 5Final Confirmation

  1. When Windows asks you to confirm, click Yes.

The firewall goes back to its original state. The change applies right away.

📝NoteSome Windows versions call it Microsoft Defender Firewall and others call it Windows Defender Firewall.

The steps are the same, only the name differs.

Option 3Resetting with Advanced Security (For Advanced Users)

This method is more technical and shows more detail about the firewall. It suits users who are comfortable with advanced system settings. It is available on Home as well as Pro.

Step 1Open Windows Defender Firewall with Advanced Security

  1. Press Windows key + R to open the Run dialog box.
  2. Type wf.msc.
  3. Press Enter.

The Windows Defender Firewall with Advanced Security console opens. If Windows asks for permission, click Yes.

Advertisement

Step 2Find the Restore Default Policy Option

Use one of the options below. They all lead to the same command.

  • In the left pane, click "Windows Defender Firewall with Advanced Security on Local Computer." Then, in the right "Actions" pane, click "Restore Default Policy."
  • Or, with "Windows Defender Firewall with Advanced Security on Local Computer" selected on the left, click "Action" in the top menu bar, then choose "Restore Default Policy."
  • You can also right-click "Windows Defender Firewall with Advanced Security on Local Computer" in the left pane and select "Restore Default Policy" from the menu that appears.

A confirmation dialog opens.

Step 3Confirm the Reset

  1. Read the warning in the dialog.
  2. Click Yes to approve restoring the firewall's default settings.

A box then confirms that the reset is complete.

Step 4Acknowledge Completion

  1. Click OK on the completion box.
  2. Close the tool.
  3. Recreate any custom app rules you wrote down earlier, so your games and programs can connect to the internet again.

The Advanced Security tool gives you precise control over firewall rules. If you need to re-add custom rules after the reset, this is where you do it. If you exported your policy earlier, you can bring it back with Action Import Policy, but that also brings back any rule that caused the original problem. Documenting your critical rules before the reset is a good habit.

Option 4Resetting via Command Prompt (For Command-Line Users)

Resetting Microsoft Defender Firewall with a text command is fast, and it suits advanced users. It changes the firewall configuration directly, with no windows to click through. You need an elevated (administrator) Command Prompt.

Step 1Open Command Prompt as Administrator

  1. Click the Start button or the search bar.
  2. Type Command Prompt.
  3. Right-click Command Prompt in the results and select Run as administrator.
  4. Click Yes when the User Account Control prompt asks for permission.

A Command Prompt window opens with "Administrator: Command Prompt" in the title bar. If you don't see that, close it and try again, because the reset won't work without administrator rights.

Step 2Enter the Reset Command

  1. Type netsh advfirewall reset into the Command Prompt window.
  2. Press Enter.

The command wipes all custom configurations and returns your security settings to their original factory state. It runs instantly and does not ask for confirmation, so be sure you want the reset before you press Enter.

💻Code
netsh advfirewall reset

Step 3Wait for Confirmation

The command runs, and you should see a short confirmation that the reset worked. It is often just Ok.

Step 4Close Command Prompt

  1. Close the Command Prompt window.

Your firewall settings have been reset. No restart is needed.

Tip: Commands can look intimidating, but they are simple to use. Check that you typed the command exactly as shown, to prevent errors.

Option 5Resetting via PowerShell (Another Command-Line Option)

PowerShell is the more modern command-line tool in Windows. This method gives the same result as the Command Prompt method, but it uses a different command. As before, you must run PowerShell as administrator.

Step 1Open PowerShell as Administrator

  1. Click the Start button or the search bar.
  2. Type PowerShell.
  3. Right-click Windows PowerShell in the results and choose Run as administrator.
  4. Click Yes if you are prompted to allow changes.

A blue PowerShell window opens, with "Administrator: Windows PowerShell" in the title bar.

Step 2Enter the PowerShell Reset Command

  1. Type or paste the following command into the PowerShell window.
  2. Press Enter.
💻Code
(New-Object -ComObject HNetCfg.FwPolicy2).RestoreLocalFirewallDefaults()

Step 3Observe the Result

The command gives very little feedback. Typically you won't see a success message. It simply finishes and returns you to the prompt. If no error appears in red text, the reset worked. If you do see an error, check that the window says Administrator and that the command was entered exactly as shown.

Step 4Close PowerShell

  1. Close the PowerShell window.

Your firewall is now back to its defaults.

Note: Type the command exactly as written above. Copying and pasting it is the safest way to avoid typing mistakes.

Summary

Restoring Microsoft Defender Firewall to its default settings is a reliable way to fix problems with apps or network connections. You can do it from Windows Security or Control Panel, or with the more advanced tools. Afterward, the firewall is back in a known-good state that protects your computer.

If a program still can't connect, re-create its allow rule, restart your PC, and check whether another security product is managing your firewall.

Was this guide helpful?

Tags: #Windows 11
Was this helpful?
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

📚 Related Tutorials

How to Reset Windows Security App in Windows 11
Windows How to Reset Windows Security App in Windows 11
Easy Way to Open Windows Security in Windows 11
Windows Easy Way to Open Windows Security in Windows 11
How to Check Network Adapter Connection Speed In Windows 11
Windows How to Check Network Adapter Connection Speed In Windows 11
How to Access Settings in Windows 11
Windows How to Access Settings in Windows 11

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

Leave a Comment

Your email address will not be published. Required fields are marked *