Today I will tell you how to enable or disable ping machines on the network for example, debian. This is very useful. Let’s say you need to make an anonymous. Execute the command and rejoice!
Ban ping your machine use:
echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all
This command disables all icmp packets.
Now you probably think, but how then to get rid of the ban?
And allow you can by:
echo/proc/sys/net/ipv4/icmp_echo_ignore_all > 0
There is another way:
iptables-A INPUT-p icmp-icmp-type 8-j DROP
Especially useful at the gateway because it allows you to disable trackbacks on a particular interface in a particular network and so iptables is powerful stuff.
For example in this way is to disable the ping interface eth1:
iptables-A INPUT-i eth1-p icmp-icmp-type 8-j DROP