How to Backup and Restore Microsoft Defender Firewall in Windows 11
Backing up and restoring Microsoft Defender Firewall in Windows 11 lets you save and reapply your custom security rules. Your firewall acts as a digital gatekeeper, controlling network traffic to protect your PC from threats.
This process is essential if you’re upgrading to a new PC or need to revert to a previous configuration after troubleshooting. You can ensure your personalized security settings remain intact.
This guide details two straightforward methods for backing up and restoring your Windows 11 firewall settings, ensuring your digital defenses are always protected.
Method 1Using Windows Security App
This is the easiest way for most people. Follow these steps:
- Click the Start button on your taskbar.
- Select Settings from the menu.

- Click Privacy & security on the left side.
- Find the Windows Security tile and click it.

- Click the Open Windows Security button.

- In the Windows Security app, select Firewall & network protection. You can also use this shortcut: Firewall & network protection.

- Scroll down and click the Advanced settings link at the bottom.

To Back Up Your Settings:
- In the window that opens, click Export Policy.
- Choose where you want to save your backup file.
- Give the file a name (it will be a .wfw file).
- Click Save.

To Restore Your Settings:
- Go back to the Advanced settings window.
- Click Import Policy.
- Find your backup file and open it.
- Your firewall settings will be restored.
Method 2Using Command Prompt or PowerShell
⚠️ Admin Required: This method requires administrator privileges.
- Open the Windows Terminal app as administrator.
- Choose either the Command Prompt or PowerShell tab.
To Back Up Your Settings:
Using Command Prompt:
netsh advfirewall export "%userprofile%\Desktop\FirewallBackup.wfw"Using PowerShell:
netsh advfirewall export "$Env:USERPROFILE\Desktop\FirewallBackup.wfw"This creates a backup file called “FirewallBackup.wfw” on your Desktop. What happens? Your firewall settings are saved as a single file you can use anytime.
To Restore Your Settings:
Run this command in either Command Prompt or PowerShell:
netsh advfirewall import "C:\Users\User\Desktop\FirewallBackup.wfw"⚠️ Note: Replace “📁C:\Users\User\Desktop\FirewallBackup.wfw” with the actual location of your backup file.
That’s all you need to do!
Summary
Backing up and restoring your Microsoft Defender Firewall settings in Windows 11 is simple and important. You have two options:
- Windows Security App: Use the Export and Import Policy buttons. This is easier for most people.
- Command Prompt or PowerShell: Use special commands to back up and restore your settings. This method requires administrator privileges.
Why do this? Regularly backing up your firewall settings lets you quickly restore them if something goes wrong. It also helps when you set up a new computer.
What happens when you do this? Your firewall configuration stays the same, and your network security stays protected. Always keep your backup files in a safe place where only you can access them.
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!