Follow
Windows

How to Backup and Restore Microsoft Defender Firewall in Windows 11

Richard
Written by
Richard
Jan 30, 2026 Updated Apr 2, 2026 3 min read
How to Backup and Restore Microsoft Defender Firewall in Windows 11
How to Backup and Restore Microsoft Defender Firewall in Windows 11

Backing up and restoring Microsoft Defender Firewall settings in Windows 11 allows you to quickly reapply your custom security rules after a system reset or when migrating to a new PC.

Microsoft Defender Firewall acts as your digital gatekeeper, controlling inbound and outbound network traffic to protect your PC from malware and unauthorized access.

This feature is particularly useful when you’ve configured advanced rules, like blocking specific ports or allowing trusted applications, which can be time-consuming to re-enter manually.

You can export your current firewall profile, which is essential for maintaining your personalized security posture across different Windows 11 installations.

⚡ Quick Answer

Export your firewall policy from Windows Defender Firewall with Advanced Security. Navigate to Firewall & network protection, then Advanced settings, and click Export Policy to save your configuration. To restore, return to Advanced settings and select Import Policy, choosing your saved backup file.

Why Back Up Your Firewall Settings?

Backing up your firewall keeps your security settings safe. If something goes wrong, you can restore them quickly. You won’t have to set up everything again from scratch.

Method 1Using Windows Security App

This is the easiest way. Follow these simple steps:

  1. Click the Start button (Windows icon), then click Settings.
Windows 11 Start menu with Settings highlighted
windows 11 start menu settings updated

  1. Click Privacy & security on the left side, then click Windows Security.
Windows Security option in Privacy & security settings
Windows Security option in Privacy & security settings

  1. Click the Open Windows Security button.
Open Windows Security button
Open Windows Security button

  1. In the Windows Security app, click Firewall & network protection. You can also open it with this link: Firewall & network protection.
Firewall & network protection section in Windows Security app
Firewall & network protection section in Windows Security app

  1. Scroll down and click Advanced settings.
Advanced settings link in Windows Security app
Advanced settings link in Windows Security app

  1. A new window called Windows Defender Firewall with Advanced Security will open. On the right side, click Export Policy to save your settings.
Export and Import Policy options in Windows Defender Firewall Advanced Security
Export and Import Policy options in Windows Defender Firewall Advanced Security

  1. Choose where you want to save the file (like your Desktop). Type a name like FirewallBackup.wfw. Click Save.

What Happens After You Export?

Your firewall settings are now saved in a file. You can keep this file safe and use it later if you need to.

How to Restore Your Settings

Go back to the Windows Defender Firewall with Advanced Security window. Click Import Policy. Select your saved backup file. Your firewall settings will be restored.

Method 2Using Command Prompt

If you like typing commands, you can use this method instead.

  1. [ADMIN REQUIRED] Open Windows Terminal as administrator. Click Start, type Windows Terminal, right-click it, and choose Run as administrator.
  2. Make sure you are in the Command Prompt or PowerShell tab.

To Backup Your Firewall Settings

Type this command and press Enter:

💻Code
netsh advfirewall export "%userprofile%\Desktop\FirewallBackup.wfw"

This saves your backup file on your Desktop.

To Restore Your Firewall Settings

Type this command and press Enter (change the path if your file is somewhere else):

💻Code
netsh advfirewall import "%userprofile%\Desktop\FirewallBackup.wfw"

Your firewall settings are now restored.

Summary

  • Backing up your firewall settings protects your computer and saves time if you need to fix problems.
  • You can use the easy Windows Security app or type commands to back up and restore.
  • Keep your backup files in a safe place so no one else can access your firewall settings.
  • Learning both methods gives you more control over your computer’s security.

What is 3 2 1 backup configuration?

The 3-2-1 backup rule is a data protection strategy where you keep three copies of your data on two different types of media, with one copy stored off-site. It's a simple framework designed to ensure that no single failure—whether a hardware crash, a fire, or a malicious hacker—can wipe out your important information.

How to save firewall settings?

Log in to the firewall with an administrative account that has the role privileges required to save the desired changes. Select ConfigSave Changes at the top of the web interface. Select Save Changes Made By. To filter the Save Scope by administrator, click , select the administrators, and click OK.

Was this guide helpful?

Tags: #Windows 11
Was this helpful?
Richard

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.

📚 Related Tutorials

How to Back Up and Restore Device Drivers in Windows 11
Windows How to Back Up and Restore Device Drivers in Windows 11
Protect Your Windows 11 with Microsoft Security
Windows Protect Your Windows 11 with Microsoft Security
How to Open Windows Terminal as Admin Automatically
Windows How to Open Windows Terminal as Admin Automatically
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 *