Although every installation of Windows 10 comes with the same set of default rules, you can always create new custom rules to allow or block apps from accessing the network. If you have created multiple firewall rules, and you don’t want to lose you settings after a clean installation, or you want configure other devices with the same policy, you can export and import the Windows Defender Firewall rules using the advanced settings console and Command Prompt. In this guide, you’ll learn the steps to export the current list of firewall rules as well as the steps to import the rules to a new installation of Windows 10.

How to export and import firewall rules using Windows Security How to export and import firewall rules using Command Prompt

How to export and import firewall rules using Windows Security

If you want to backup all the Windows 10 firewall rules, so you can then restore to another installation, you can use the Windows Security app.

Backing up firewall rules

To export firewall rules using Windows Security, use these steps: Once you complete the steps, the firewall rules will export in the wfw file that you can easily import to the same or different computer. Windows Security firewall advanced settings option Windows 10 firewall export rules option Export firewall rules to wfw file

Restoring firewall rules

To import firewall rules from an exported file, use these steps: After you complete the steps, the policy will overwrite the current rules with the ones in the .wfw file. Windows Security firewall advanced settings option Windows 10 firewall import rules option Import firewall rules to wfw file

How to export and import firewall rules using Command Prompt

Alternatively, you can also export and import firewall rules on Windows 10 using Command Prompt.

Exporting firewall rules

To export the current firewall policy using Command Prompt, use these steps: Once you complete the steps, all the firewall rules will be exported to a .wfw, which you can then import on another installation of Windows 10. Export firewall rules using netsh command

Importing firewall rules

To import firewall rules on Windows 10 with Command Prompt, use these steps: After you complete the steps, the firewall rules will import overwriting the device current policy settings. Import firewall rules using netsh command We’re using Command Prompt, but you can also use the commands on PowerShell. All content on this site is provided with no warranties, express or implied. Use any information at your own risk. Always backup of your device and files before making any changes. Privacy policy info.