A ping is a communication protocol that is part of the IP protocol, a portion of the TCP/IP protocol. It can be used to check if the network is able to connect, so it can help us to analyze and determine the network fault. The application format is: Ping IP address. But service-enabled pings can sometimes cause a lot of trouble.
As a result, Linux server administrators can restrict the server from pinging other users, sometimes as needed (such as to prevent attacks). It also ensures that the Linux server can ping other servers.
The following is the simplest method of ping-cut in Linux
First login to the server between the terminal execution: Echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all
This will allow the ping to be banned. If you want to restore ping, you can execute the command
echo 0 >/proc/sys/net/ipv4/icmp_echo_ignore_all
The easiest way to disable ping under Linux