The blog includes a vivid coverage of the concepts of CCNA, CCNP (Routing & Switching) , Basic Linux and Linux servers. Projects have also been simulated to give a practical exposure.

Wednesday 9 April 2014

Disable Ping in Linux

No comments

Disable Ping in Linux

There are several methods by which a Ping response can be rendered disabled such as server security, in order to prevent network congestion.

TYPES:- 1. Temporary 2. Permanent   

Disable Ping response Temporarily: 

The ping response can be temporarily disabled by running the following command as root 
# echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all 

As a consequence the kernel is instructed to ignore the ping request. However this is a temporary method and will get removed on rebooting the server. 

To enable the ping response back you can run the following command:
# echo "0" > /proc/sys/netipv4/icmp_echo_ignore_all

The method adopted enables the ping temporarily if the ping is disabled permanently.

Disable Ping Response Permanently

To permanently disable the ping response perform the following simple steps:

1. Open the sysctl.conf file in any text editor:
# vi /etc/sysctl.conf

2. Add the following line at the end of the file:
net.ipv4.icmp_echo_ignore_all = 1

3. Now save the code and exit from the file.
 :wq
 
4. Then Execute “sysctl -p” to enforce this setting immediately.
# sysctl -p

 Once the above cited steps are followed, it will be noticed that the server no longer reacts to your ping responses.

By :- Vishal Sharma

No comments :

Post a Comment