PING (Packet InterNet Groper) is used to send ICMP (Internet Control Message Protocol) requests to the remote host & wait for an ICMP response. Using this protocol you can check if the remote host is accessible over the network.
You can disable these ICMP requests to your server in order to stop the ICMP attack targeting your servers. By default, incoming ICMP requests are enabled on Linux cPanel Servers. You can disable them using 4 different methods.
1. Execute the command below & it will disable incoming ICMP requests to your server.
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
2. Open the file /etc/sysctl.conf & add the value below.
net.ipv4.icmp_echo_ignore_all = 1
Save the settings with command
sysctl -p
3. If you have CSF installed, you can disable incoming ICMP requests by changing few parameters in /etc/csf/csf.conf. Find for ICMP_IN & ICMP_IN_RATE. Set them to 0 and restart csf.
4. Using iptables, you can disable incoming ICMP requests with command below
iptables –A INPUT –p icmp –icmp-type echo-request –j DROP