Knowledge Base
MilesWeb / How-Tos

How To Disable ICMP Requests On cPanel Server?

Approx. read time : 2 min

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

With over 10+ years of experience in the web hosting industry, I have achieved extensive exposure to result-oriented methodologies. And expertise in different domains like Datacentre Services, Cloud computing technology, Web hosting industry and many more.