Disable Ping Response

Disable Ping Response

What is a ping:

A ping is a simple network utility used to check if a machine is online and to test the network connection.

It sends a small network packet to the target machine. If the machine is up, it responds back with an answer. The time it takes to receive the response is called the ping time or round-trip time.

The ping response from an IP address indicates that the machine is reachable and online.

Why disable ping responses?

Unfortunately, ping responses can be used to quickly scan an IP range and identify reachable hosts. This scanning method could be used by attackers to find potential vulnerabilities or hackable machines.

If your machine does not respond to pings, it reduces its visibility on the network. However, this does not make your machine more secure; it just makes it harder to detect from the internet.

How do I disable the ping response?

To disable ping responses, add the following line to your network init script (the file name will depend on your Linux distribution):

echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all

This command disables ping responses.

Re-enabling Ping Responses

If you wish to re-enable ping responses, run the following command:

echo 0 >/proc/sys/net/ipv4/icmp_echo_ignore_all

Making the Change Permanent

To make this change permanent across system reboots, add the following line to the /etc/sysctl.conf file (if it exists):

net.ipv4.conf.icmp_echo_ignore_all = 1
  • 0 Пользователи нашли это полезным
Помог ли вам данный ответ?

Связанные статьи

Adding New IP Addresses to a CentOS/Fedora Server via SSH

Adding New IP Addresses to a CentOS/Fedora Server via SSH Follow the procedure below to add...

How To Block an IP Address

How To Block an IP Address Login to your Linux server via SSH. Blocking an IP Address To block...

How to Change SSH Port in CentOS

How to Change SSH Port in CentOS Login to your server via PuTTY or any other SSH client....

How to Reset MySQL Password

How to Reset MySQL Password If you have forgotten your MySQL root password, follow these steps...

How to Add a Port to iptables in Linux

How to Add a Port to iptables in Linux Note: This document is for reference only. We do not take...