How to Export and Import Firewall Rules in Windows 10



RECOMMENDED: Click here to fix Windows errors and optimize system performance

In Windows 10, the Windows Defender Firewall is a security feature that checks incoming and outgoing network traffic and allows or blocks certain traffic based on predefined rules.

Although each installation of Windows 10 comes with the same default set of rules, you can create new custom rules at any time to allow or block application access to the network. If you have created multiple firewall rules and do not want to lose your settings after a clean installation, or if you want to configure other devices with the same policy, you can export and import Windows Defender firewall rules using the Advanced Settings Console and the command prompt.

This guide provides the steps for exporting the current list of firewall rules and the steps for importing the rules into a new Windows 10 installation.

Using Windows Firewall with Advanced Security

  1. Simply press the Windows + R key, type wf.msc in the “Run” command field and press Enter.
  2. This will open the Windows Firewall with the Advanced Security MMC snap-in. In the Actions pane on the right, you can click on the appropriate link to export the export or import policy or restore the default policy.
  3. Just follow the step-by-step wizard in the user interface to export/import your firewall policy. The firewall policy is exported in a single binary file with the .wfw extension.


January 2021 Update:

We now recommend using this tool for your error. Additionally, this tool fixes common computer errors, protects you against file loss, malware, hardware failures and optimizes your PC for maximum performance. You can fix your PC problems quickly and prevent others from happening with this software:

  • Step 1 : Download PC Repair & Optimizer Tool (Windows 10, 8, 7, XP, Vista – Microsoft Gold Certified).
  • Step 2 : Click “Start Scan” to find Windows registry issues that could be causing PC problems.
  • Step 3 : Click “Repair All” to fix all issues.

download



Backing up and Restoring firewall rules on Windows 10 with Netsh

  • Open a new instance of the elevated command prompt.
  • The syntax of the command looks like this:
    • netsh advfirewall export “path\to\file.wfw”
  • Modify the path portion of the file to suit your needs.
  • When you run the command, it produces the following output :

To restore Windows firewall rules using netsh.

  • Open a new instance of the elevated command prompt.
  • The syntax of the command looks like this:
    • netsh advfirewall import “path\to\file.wfw
  • I will use the same file to restore the exported rules.
  • Again, you should change the part of the file path as needed.
  • The command will produce the following output:

Files exported and imported with both methods are compatible. This means that you can export your rules via the GUI and restore them with netsh and vice versa. This is very useful if you want to automate the process of backing up and restoring your firewall rules.

Conclusion

The Windows Firewall works as a reservoir for the Windows 10 PC and must be defined by the users with the highest priority. Importing Firewall settings into your system will be the practice to maintain the security level of your PC. I therefore recommend always importing Windows 10 firewall settings.

https://superuser.com/questions/589855/import-export-specific-windows-firewall-rule



RECOMMENDED: Click here to troubleshoot Windows errors and optimize system performance