Setting up Ping Block on Windows System

To prevent hackers from discovering and attacking the machine through network ping scanning, you can disable the ping command on the local machine.

 

 

 

1.Press the Win+R shortcut key on your computer desktop to open the Run window. Type "cmd" in the search box and click OK.

 

 

2.Enter the following command in the command prompt window.:

  • netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=block 

This command adds a new rule on top of the existing rules. If you want to restore the ability to ping, you can simply delete this rule

  • netsh advfirewall firewall del rule name="ICMP Allow incoming V4 echo request" 

 

 

3.At this point, if we check the IP, we can see that ping is blocked. However, if we want to test the IP connectivity, we can perform a ping test on a specific port, and we can see that it is reachable. If we want to restore the ping block, we can simply enable the aforementioned rule again.

 

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What to do if you are unable to access the desktop of a Windows Server 2012 system after uninstalling certain software

一.Issue description For Windows Server 2012 operating system, when installing certain...

Change Administrator Password in Windows

There are two ways to manually change the Windows Administrator password: 一.Changing the...

Compress/Expand Disk Space in Windows System

When compressing a partitioned disk in Windows, it is important to backup your data beforehand to...

To disable automatic system updates on Windows

  1.Remotely access the Windows instance using Remote Desktop. 2. Click on the Start...