How to disable PING or ICMP replies from a Ubuntu Server 16.04.2 Temporarily
How to disable PING or ICMP replies from a Ubuntu Server 16.04.2 Temporarily:
A server admin or an user can disable ping or icmp replies from a server for the following reasons,
- Security.
- Avoid network congestion.
- Avoid network flood using ping hostname -f
Prerequisites:
- Ubuntu Server 16.04.2
Implementation:
Follow the below instructions in order to disable PING or ICMP replies from Ubuntu server temporarily,
From the command line type ,
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all
Note: Once the server is rebooted, the settings will go away, you have to reinforce it.
In order to re-enable the Ping and ICMP replies, either reboot the server or type the below command,
echo "0" > /proc/sys/net/ipv4/icmp_echo_ignore_all