Ping can be used to see if a route to the target system exists. The ICMP protocol can be leveraged to get an answer so you know the remote system is actually powered on.
| from specific source IP | ping -S 127.0.0.1 tilde.fun |
|---|---|
| from primary IP of interface | ping -S eth0 tilde.fun |
This should never be done as security by obscurity isn't actually security[(Disabling ICMP and SNMP won’t increase security, but will impact network monitoring (Wayne Tolliver, Paessler.com, 2020-2022) )]. Pinging hosts is a low-tech way to debug network problems and you're definitely not doing yourself or others[(users, customers)] any favors by disabling it.