Disable or enable ping

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”

  1. 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.

Tags

Filed Under: Linux Networking

Anthony Gee About the Author: Anthony G. is an IT specialist with more than 9 years of solid working experience in the Web Hosting industry. Currently works as server support administrator, involved in consultative discussions about Web Hosting and server administration. One of the first writers in the Onlinehowto.net website, now writing for Free Tutorials community - he is publishing tutorials and articles for the wide public, as well as specific technical solutions.

Leave a Reply