Windows – Why I can’t block PING.EXE inbound and outbound traffic

firewallnetworkingpingwindowswindows 7

I want to block C:\Windows\System32\ping.exe for any inbound or outbound traffic in Windows-7. So in the Windows Firewall, I added two rules to aim this goal (one for inbound and one another for outbound traffic).

Firewall is On. but still I can ping others and others can ping my computer. Why?

The Firewall configuration:

enter image description here

enter image description here

enter image description here

Note that I know I can block ICMP protocol instead, but I don't want to block it in that way. I just want to block this program.

Best Answer

How do I allow or block Ping Response in Windows?

Blocking ping.exe will not stop inbound ping responses as they are are handled at a lower level by the operating system.

ping.exe is used to make outbound ping requests.

Instead you need to block the Ping Port and Protocol (both inbound and outbound in your case.

  1. Press the WIN key, type "windows firewall" and run it.

  2. Click on "Advanced settings" located at the left hand sidebar.

  3. Click on "Inbound Rules" at the left pane.

  4. Click "Action" from the menu bar and select "New Rule".

enter image description here

  1. Click on "Custom" and click "Next".

  2. Make sure the "All programs" option is selected and click "Next".

  3. Click on the "Protocol type" drop down menu, select "ICMPv4" and click "Next".

enter image description here

  1. Make sure both "Any IP address" is selected and click "Next".

  2. If you want to enable ping when you are connected to a public network, select "Allow the connection". If you want to block ping even when you are connected to home network, select "Block the connection" option and click "Next".

enter image description here

  1. You can leave all the checkboxes ticked for the profiles and click "Next".

  2. Give this new rule any name you like, for example "block ping" or "allow ping" and click "Finish".

    The newly created firewall rule will take effect instantly without requiring a reboot.

Additional Note:

In the Windows operating system, selecting your network location as Home or Work will allow ping while the Public network profile will block ping. The above Windows Firewall rule will override the network location rule.

Source 4 Ways to Allow or Block Ping Response in Windows

Related Question