On this post we will learn how to allow / deny ping on Linux servers, this is useful for both plain CentOS / Ubuntu servers running CSF Firewall, as well as cPanel based servers. But first, let’s learn what is ICMP after all.
What is ICMP?
ICMP means Internet Control Message Protocol, it is an important part of the part of the internet protocol suite because it is widely used by millions of networks around the globe day by day.
Servers, computers, network devices such as routers, gateways and more use the ICMP protocol to indicate the state of the network on the host where it is running. If enabled, ICMP will report if the host is down or unreacheable for some reason.
Lot of internet connection diagnosis tools like ping and traceroute use ICMP to detect network failures on remote servers.
How can I allow / deny ping on Linux if I’m using CSF firewall?
If you are using CSF firewall on a plain server (like CentOS, RHEL, Ubuntu or Debian), you can always edit the csf.conf main configuration file. Let’s see an example:
nano -w /etc/csf/csf.conf
Now look for this variable: “ICMP_IN” and set it to “0”, as you see below:
ICMP_IN = "0"
Once you are done, restart CSF firewall to apply changes:
- how to install csf on debian
- HOW TO INCREASE DENY IP LIMIT IN CSF FIREWALL
- debian / ubuntu dig command not found
- How to block SASL login attacks in zimbra using csf
- How To List and Delete Iptables Firewall Rules