How to Disable / Enable windows firewall by command prompt

How to Disable / Enable windows firewall by command prompt :- A firewall stands as a guard between your system and the World Wide Web. It prevents the malicious codes from entering your system and causing you trouble. It is often counted as a blessing and turning the windows firewall on, is one of the primary tasks anyone would accomplish once they buy a new system. But some of the users love to explore through the web and they don’t really mind bringing back a nasty virus with them when they return. Of course, they do know how to bid them farewell if they knew how to say welcome to them. So it is necessary to turn the windows firewall on or off every now and then. In this article, I have tried to explore the ways in which you can turn your windows firewall on or off in various networks through command prompt. Read on, to learn how to hack this simple trick.

See also : – How to import and export firewall settings



STEP 1

  • Firstly, you need to launch the Command Prompt. For that, start typing cmd into your Cortana search box. This will result in the Cortana displaying the search results for you. Find the one named Command Prompt.

1commandPrompt

STEP 2

  • Now right click on Command Prompt and from the menu that appears, click on Run as administrator. This will open the Command Prompt in administrator mode.

2runAsAdmin

STEP 3

  • To turn off the firewall, type-in or copy-paste the following command into your Command Prompt.
    netsh advfirewall set allprofiles state off
    

3firewallOff

STEP 4

  • If there are no errors in the command you entered, the Command Prompt will show a success message which says Ok.

4offOk

STEP 5

  • If you ever feel like turning on your windows firewall again, just open the Command Prompt in administrator mode again and type-in or copy-paste the following command.
    netsh advfirewall set allprofiles state on
    

5firewallOn

STEP 6

  • Just like before, if there are no errors in the command you entered, the Command Prompt will show a success message which says Ok.

6onOk

There are some more commands that are widely used to manipulate the windows firewall. Some of them are explained below.

Firewall for current user only

If you want to disable or enable the windows firewall for the current user only, you can refer to the following commands. This will retain the firewall settings for others users in the system.

  • To disable:
    netsh advfirewall set currentprofile state off
    

    To enable:

    netsh advfirewall set currentprofile state on
    

Firewall on Domain network

  • To disable:
    netsh advfirewall set domainprofile state off
    

    To enable:

    netsh advfirewall set domainprofile state on
    

Firewall on Public network

  • To disable:
    netsh advfirewall set publicprofile state off
    

    To enable:

    netsh advfirewall set publicprofile state on
    

Firewall on Private network

  • To disable:
    netsh advfirewall set privateprofile state off
    

    To enable:

    netsh advfirewall set privateprofile state on
    


Yeah, we are done. That’s all about it. Don’t forget to try out these tricks today itself, but be a bit cautious when turning off your firewall. Hope you had fun reading out the article.

2 Comments

  1. rahul November 23, 2016
  2. Christopher November 24, 2016

Leave a Reply

Your email address will not be published.

css.php