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

CredSSP encryption oracle remediation error in Windows Remote Desktop

Issue description: When attempting to connect to a Windows instance using Remote Desktop, "An...

How to create a partition in Windows system

1.Right-click on the Start menu in the Windows Server desktop and select "Disk Management."...

Change the remote port number in Windows

The remote port number for Windows systems is between 1024 and 65535, and you can choose any...

Change Administrator Password in Windows

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