Step 1. Windows Firewall: General
The General tab with its default settings is shown in the following figure.

From the General tab, you can select the following:
-
On (recommended)
Select to enable Windows Firewall for all of the network connections that are selected on the Advanced tab. Windows Firewall is enabled to allow only solicited and excepted incoming traffic. Excepted traffic is configured on the Exceptions tab. -
Don’t allow exceptions
Click to allow only solicited incoming traffic. Excepted incoming traffic is not allowed. The settings on the Exceptions tab are ignored and all of the network connections are protected, regardless of the settings on the Advanced tab. -
Off (not recommended)
Select to disable Windows Firewall. This is not recommended, especially for network connections that are directly accessible from the Internet, unless you are already using a third-party host firewall product.
Enable/Disable Windows firewall using command line
netsh firewall set opmode
[ mode = ] ENABLE|DISABLE
[ [ exceptions = ] ENABLE|DISABLE
[ profile = ] CURRENT|DOMAIN|STANDARD|ALL
[ interface = ] name ]
Sets firewall operational configuration.
Parameters:
mode – Operational mode.
ENABLE – Enable firewall.
DISABLE – Disable firewall.
exceptions – Exception mode (optional).
ENABLE – Allow through firewall (default).
DISABLE – Do not allow through firewall.
profile – Configuration profile (optional).
CURRENT – Current profile (default).
DOMAIN – Domain profile.
STANDARD – Standard profile.
ALL – All profiles.
interface – Interface name (optional).
Examples:
Enable the Firewall:
netsh firewall set opmode enable
Enable the Firewall and DO NOT Allow Port/Program Exceptions:
netsh firewall set opmode enable disable
Enable Firewall and Allow Port/Program Exceptions:
netsh firewall set opmode enable enable
Disable the Firewall:
netsh firewall set opmode disable