How To Disable ICMP Requests On cPanel Server ?
Sending ICMP (Internet Control Message Protocol) queries to a distant host and waiting for an ICMP response are done using PING (Packet InterNet Groper). You may verify whether the remote host is reachable via the network by using this protocol.
To block the ICMP assault that is aimed at your servers, you can disable certain ICMP queries to your server. On Linux cPanel servers, inbound ICMP queries are allowed by default. Four distinct approaches can be used to disable them.
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