Export and import Windows Firewall rules

The integrated Windows Firewall is very likely known to most users and offers the Windows user a fairly good security against external attackers. As a rule, the Windows firewall is also activated and more experienced users can define rules for incoming and outgoing firewalls.

Certain programs, services or ports can be configured that the Windows Firewall allows. Configuring these firewall policies can result in a large number of firewall rules or firewall guidelines in some systems. Especially when this PC is replaced by a new Windows PC, it is advisable to export the firewall rules and import them on the new system . This saves the user a considerable amount of configuration work and can be sure that his firewall guidelines work the same way as on the previous PC.

The quickest way to access the firewall is with the shortcut “wf.msc” . Then you only need to click with the right mouse button on ” Windows Defender Firewall with advanced security ” and the following firewall context menu will be visible.

Export firewall policy

Then you have to specify the exact location for the firewall export date i. The firewall rules are saved in a file with the file extension “.wfw” . After the successful export, the following message appears.

The guidelines have been exported

After you have transferred this WFW file to the new PC, the firewall guidelines are imported . This works in the same way as the export described, but the following message appears when importing.

By importing a policy, all settings ...

The exact import message is:

Importing a policy overwrites any settings in the Windows Defender Firewall with Advanced Security policy . If you want to save a copy of these settings, you must first export the current policy. Do you want to import a policy now?

The entire firewall export and import process is therefore relatively easy to carry out. For more experienced users, you can also do this using the NETSH command.

Export the firewall rules:

netsh advfirewall export “c: temp fwrechte.wfw”

Import the firewall rules:

netsh advfirewall import “c: temp fwrechte.wfw”

Please note that you can only execute these commands in a command prompt that has administrator rights.

You can find further information on the ” Windows Firewall ” in these articles:

– Configure Windows Firewall using Group Policy (file and printer sharing)
– PowerShell command to deactivate the firewall

Use PowerShell command to query, switch Windows Firewall off and on – Windows 0x800706d9 error message – Windows Firewall problems
– Command to quickly deactivate Windows Firewall
– 0x80070422 Windows Firewall Error
– Configure the firewall for WMIC remote queries in Windows 7
– Switch Windows Firewall on or off using a shortcut