Ticker

6/recent/ticker-posts

How to view firewall profiles, enable/disable windows 10 firewall using netsh command

Netsh command line tool is one of the built-in commands in windows operating system; you can use this tool to configure settings for network components. 
 
Also with Netsh command line tool you can configure windows firewall rules by turning the firewall on/off, monitor active connections and display the configuration and status of windows firewall with advanced security.
If you’re using Microsoft windows operating system, you will find built in firewall that prevents you from internet security threats. Now, let’s get familiar what firewall means.

What is Firewall?

Firewall in simple meaning you can define Firewall, as the software or hardware or combination of software and hardware that main task is to prevent unauthorized program through keeping the damage on one part of the network and prevent data’s from getting in or out of particular areas.


In this article I will teach you on how you can examine the basic firewall options by using Netsh command line such as turning on/off the firewall, allow incoming ICMP ECHO requests by using administrator access.

Start windows firewall service command line

First you will need to run Netsh command as administrator: To open Netsh command, type in Netsh command on search windows near the windows button on your left hand at the corner of your computer monitor. Right click on the command and run as administrator the pop up window will be prompted to you allow, requires you to verify user access permission. Click yes.

View the firewall current profiles

You can use Netsh command to view the current firewall profiles on your computer. Use the following command to view the firewall current profile: NETSH>ADVFIREWALL SHOW CURRENTPROFILE:


The command will show you Firewall policy, logging connections, inbound notification etc. 

Enable/Disable the firewall on windows

You can decide to turn off firewall for a while for instance if happen you want to install certain software in your computer, and you worried can be blocked by firewall. You can turn off firewall for a while using Netsh command and then you turn back on netsh firewall context. Use the command below to turn off the firewall:
NETSH>FIREWALL SET OPMODE DISABLE

To verify if the firewall turned off verify it through the control panel: Go to the control panel, select system and security and click Windows Firewall to check the firewall status especially if it’s turned off or on.
To enable the firewall again, use the command below to turn it on again:
NETSH>FIREWALL SET OPMODE ENABLE

Enable/Disable ICMP ECHO Request

Usually happen you want to share and print folders and files with other user on the network. With ICMP ECHO request disabled on windows firewall you can’t ping the machine available on the network, so to avoid all of this you will need to enable ICMP ECHO using Netsh command so that you can share and print files and folders. To allow incoming ICMP ECHO request use the following command: NETSH>FIREWALL SET ICMPSETTING 8 ENABLE

Now the users available on the network will be able to ping the specified host. If you want to disable this features use the following command: NETSH>FIREWALL SET ICMPSETTING 8 DISABLE

Enable file and printer sharing

With Netsh command you can allow all user on the network to access shared resources on the specified host. Also you can decide to allow only one user if you don’t want to be accessed by all users on the network, you need to specify IP address of that particular user who want to access your resources on the network. To allow file and print sharing for all users on the network type the command below: NETSH>FIREWALL SET SERVICE FILEANDPRINT ENABLE.

To specify only one user on the network use the following command: NETSH>FIREWALL SET SERVICE FILEANDPRINT ENABLE CUSTOM TYPE IP ADDRESS. For instance NETSH>FIREWALL SET SERVICE FILEANDPRINT ENABLE CUSTOM 192.168.34.0/24

Enable firewall exceptions windows

In windows firewall you can specify exceptions that the firewall will allow. Usually in default windows firewall exceptions check box is disabled. To enable the check box through Netsh command line tool use the command the following command: NETSH>FIREWALL SET OPMODE ENABLE DISABLE

Disable firewall exceptions windows

If you don’t need to allow exceptions once again, disable the check box using the following command: NETSH>FIREWALL SET OPMODE ENABLE ENABLE

Reset firewall to default settings

Also with Netsh command you can change the firewall to default settings. Use the following command to reset the firewall: NETSH>FIREWALL RESET. 

Post a Comment

0 Comments