I feel like this should be a really simple thing to do, but googling and checking SF I didn't see anything. I'm trying to make my Fedora server not respond to pings, how do I do that?
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions should demonstrate reasonable business information technology management practices. Questions that relate to unsupported hardware or software platforms or unmaintained environments may not be suitable for Server Fault - see the help center." – kasperd, Ward, Jim B, fuero, mdpc
To disable the PING response, add the following line to your init script for the network:
echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all
To reenable the PING response do this:
echo 0 >/proc/sys/net/ipv4/icmp_echo_ignore_all
To make the change permanent add the following line to
Add the following line to
It has the same effect as the above echo lines.
It is better to use firewall for these purposes, so that you can optionally enable ping from some systems, esp monitoring systems
iptables -t filter -I INPUT -p icmp --icmp-type echo-request -s monitoring_system -j ACCEPT iptables -t filter -I INPUT -p icmp --icmp-type echo-request -j DROP
You can also use this command to disable ping request
To enable it again
Finally save it
Just do this:
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
open your /etc/sysctl.conf and append this line
net.ipv4.icmp_echo_ignore_all = 1
and execute this command
it's still usable after reboot
Firewall block ICMP connections.
especially icmp echo.