How do I disable ping on a linux server?

Source: Internet
Author: User

How do I disable ping on a linux server?
Sometimes we need to set the server to the ping prohibited mode. How can this problem be achieved? It's actually very easy! Modify the/proc/sys/net/ipv4/icmp_echo_ignore_all file as root. The default value is 0, indicating that the ping value can be changed to 1, indicating that ping is disabled. So let's modify it: prompt when vim/proc/sys/net/ipv4/icmp_echo_ignore_all is saved: why? Check the document and find that if you want to modify the value, you can echo 0 or 1 to this file. Knowing that proc/sys/net/ipv4/icmp_echo_ignore_all is not a real file, it will become invalid after the machine is restarted! To take effect permanently, write net. ipv4.icmp _ echo_ignore_all = 1 in/etc/sysctl. conf.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.