Windows Firewall Quick Start Guide

29-01-2024 03:08:22

Windows Firewall can be configured using a graphical interface, command line, or PowerShell. This quick start guide lists some common commands related to Windows Firewall to help system administrators quickly master its usage.

Graphical Interface Method

To access the Windows Firewall interface, open the Control Panel, navigate to System and Security, Administrative Tools, then Advanced Security Windows Firewall. The steps to disable Windows Firewall are as follows.

In the middle of the Windows Firewall interface, click on "Windows Firewall Properties" to open the properties dialog. Sequentially select the Domain Profile, Private Profile, and Public Profile, and change the firewall state to "Off". Finally, click "OK" to close the dialog.

Command Line Method

Enable Firewall

netsh advfirewall set allprofiles state on

Disable Firewall

netsh advfirewall set allprofiles state off

PowerShell Method

Enable Firewall

Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True

Disable Firewall

Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False