Import/Export Windows Firewall Settings Command-Line

DiogoSousa

New member
Sep 5, 2014
20
0
0
Visit site
Here’s a nice tip for those that for some reason need to configure Windows Firewall (or Windows Defender Firewall on Windows 10).

The recommended way to do this should be using a group policy but because you may have a non-domain joined machine on your network, here’s how to do it.

1. First of all, configure everything you need in Windows Firewall on a reference machine

2. Then, open an elevated command-prompt and type the following command:
netsh advfirewall export “C:\Temp\WindowsFirewallRules.wfw”

3. Now that you have the file, you can import it to any machine using the following command:
netsh advfirewall import “C:\Temp\WindowsFirewallRules.wfw”

If for any reason you need to reset firewall rules to default values just type:
netsh advfirewall reset
 

Members online

No members online now.

Forum statistics

Threads
323,181
Messages
2,243,392
Members
428,035
Latest member
powerupgo