Thursday 14 January 2016

How To Disable / Enable Windows Firewall By Command Prompt

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.

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.

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

STEP 4

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

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

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.

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

No comments:

Post a Comment