How do I disable ping response on Linux?

To disable responses to a ICMP ping request, the following two kernel parameters can be added to the /etc/sysctl.conf file.

# Disable ping response
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_echo_ignore_all = 1

To apply the changes, perform the following command.

# sysctl -p

To make it one time change, run the following command.

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

Tags: 

Comments

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.