The Windows firewall is the first and basic line of defense against malware attacks by default in Windows. The Windows firewall basically filters the internet traffic that is exchanged between the computer and the network and works to protect the PC from any malicious attacks / files.
Final report: The Windows firewall is not an antivirus and does not function as such.
Users can greatly customize their experience by changing the settings the firewall operates with, increasing or decreasing security, setting custom rules and exceptions, and more. Therefore, the option to import and export Windows firewall settings can be very useful for some of us.
The easiest way to import and export all firewall settings in Windows 10 is to use the easy way to backup and restore.
Note: These settings include advanced settings, notification settings, firewall rules, etc.
Before proceeding, make sure you are logged in as an administrator for these methods to work smoothly.
There are exactly two ways to backup and restore firewall settings on any PC,
Method 1: via the Windows firewall window
Export / backup via Windows Firewall window.
1- look for the firewall in the search box on the taskbar
2- Click on Windows Firewall.
3- Select Advanced Settings in the left panel.
4- In the top menu bar, select Action.
5- Select 'Export policy'.
6- Find the location where you want to export the configuration.
7- Name the file and make sure its extension is .wfw
8- As soon as you see a dialog that says - Policy exported successfully, your settings will have been exported.
Import / Reset Firewall Settings
1- Look for the firewall in the Windows 10 search box
2- Open the firewall.
3- Select the advanced settings on the left side.
4- Click on "Action“In the menu bar.
5- Select "Import policy".
6- Windows will show you a dialog box, confirming your actions. Click Yes.
7- Now locate the location of the configuration you wish to import and select the “.wfw” file.
8- After clicking on Open, Windows will start importing / restoring. When Windows finishes you will see a small window indicating the same thing.
Alternative method: Export or backup settings via command prompt
1- Right-click on the Windows key to view the options. Or press Windows key + x together.
2- Click on the option that says Command Prompt (Admin).
3- As soon as the window opens, type the following command to backup your firewall settings.
netsh advfirewall export “% userprofile% Desktop windowsfirewallsettingsbackup.wfw”
4- Once the process is complete, the Windows Firewall configuration will be backed up to your desktop.
Use command prompt to import / reset firewall settings.
1- Right-click on the power menu to open the list.
2- Select Command Prompt (Admin)
3- Now open the location of your .wfw file in Explorer.
4- From the address bar, note the path to the file location.
5- Now go to the command prompt window and type the following command
netsh advfirewall imports the path of the .wfw file
Now, if the file is in the "zero" folder on the desktop, the command would be
[[[netsh advfirewall import “%user profile%desktopzeroWindowsfirewallsettingsbackup.wfw”]]]
Note: without brackets.
6- Press Enter and, once the process is finished, close the window.
You have now imported the Windows Firewall settings to your PC via the command prompt.