handbook, books, note, tutorial, troubleshooting

Disable/Enable Windows Firewall ( netsh )


Disable/Enable Windows Firewall ( netsh )




*Now follow us & type these command 1 by 1*

C:\WINDOWS\system32>netsh firewall showopmode
*you should get this output*
netsh firewall how opmode
Domain profile configuration:
——————————————————————————————–
Operational mode                                            = Enable
Exception mode                                                = Enable
Standard profile configuration (current):
——————————————————————————————–
Operational mode                                            = Enable
Exception mode                                                = Enable
Local Area Connection firewall configuration:
——————————————————————————————–
Operational mode                                            = Enable

*Type 1 by 1*
C:\WINDOWS\system32>netsh firewall set opmode mode=DISABLE
C:\WINDOWS\system32>netsh firewall showopmode
*You should get this output*
Domain profile configuration:
——————————————————————————————–
Operational mode                                          = Enable
Exception mode                                              = Enable
Standard profile configuration (current):
——————————————————————————————–
Operational mode                                           = Disable
Exception mode                                               = Enable
Local Area Connection firewall configuration:
——————————————————————————————–
C:\WINDOWS\system32>

*As you can see, the Operation mode is now Disabled, that means = Firewall is OFF*

[NOTICE]
*In Windows 7, 8.1 & 10 the output is a bit different, here is an example from Win 8.1*
The command in Win 7, 8.1 & 10 is:

C:\WINDOWS\system32>netsh avdfirewall set allprofile state off
Domain profile configuration:
——————————————————————-
Operational mode                               = Enable
Exception mode                                   = Enable
Standard profile configuration (current):
——————————————————————-
Operational mode                               = Disable
Exception mode                                   = Enable
IMPORTANT: Command executed successfully.
However, “netsh firewall” is deprecated;
use “netsh advfirewall firewall” instead.
For more information on using “netsh advfirewall firewall” commands
instead of “netsh firewall”, see KB article 947709
at http://go.microsoft.com/fwlink/?linkid=121488
C:\WINDOWS\system32>




Disable/Enable Windows Firewall ( netsh )