| Type: |
Code 
|
| Level: |
Intermediate
|
| Date: |
2007-Jul-11
|
| Visited: |
1823 times
|
| Rating: |

|
| Author: |
Tony Potter |
|
|
This tutorial will show you how to disable or enable ping(ICMP) requests on a machine with RedHat like Linux operating systems.
There is a flag that must be changed according to your needs e.g. to disable or enable 'icmp_echo'
That flag must be set at this file:
/proc/sys/net/ipv4/icmp_echo_ignore_all
by default it is enabled as the flag is set to '0'
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
Once it is executed all the ICMP traffic will be disabled.
To enable it again execute the same command, but put 0 instead one after the 'echo'
Note: If you disable ICMP take in mind that this will affect all DNS services as the DNS is working over UDP and this will stop the error correction of more than 32kb package. Simply this will stop the DNS for some locations.