The ping command can be useful to check if a machine is running however this can make your server more vulnerable to hacking.
If you want to turn the ping reply off use this command
sysctl -w net.ipv4.icmp_echo_ignore_all=1
To turn it back on again
sysctl -w net.ipv4.icmp_echo_ignore_all=0