"CentOS" Ping sysctl.conf

Source: Internet
Author: User

View Settings

[Email protected] etc]# Cat/proc/sys/net/ipv4/icmp_echo_ignore_all

0


Test

huangchao-macbookpro:~ hchao$ Ping a.b.c.d

PING a.b.c.d (a.b.c.d): Data bytes

Bytes from a.b.c.d: icmp_seq=0 ttl=55 time=6.690 ms

Bytes from a.b.c.d: icmp_seq=1 ttl=55 time=5.536 ms

Bytes from a.b.c.d: icmp_seq=2 ttl=55 time=23.421 ms

Bytes from a.b.c.d: icmp_seq=3 ttl=55 time=8.740 ms

^c

--- a.b.c.d ping Statistics---

4 packets transmitted, 4 packets received, 0.0% packet loss

Round-trip Min/avg/max/stddev = 5.536/11.097/23.421/7.207 ms

huangchao-macbookpro:~ hchao$


Modify Configuration

[Email protected] etc]# vi/etc/sysctl.conf

[Email protected] etc]#

# System default Settings Live in/usr/lib/sysctl.d/00-system.conf.

# to override those settings, enter new settings here, or in an/etc/sysctl.d/<name>.conf file


# Disable Ping

Net.ipv4.icmp_echo_ignore_all=1


# For more information, see sysctl.conf (5) and SYSCTL.D (5).


Effect

[Email protected] etc]# sysctl-p

Net.ipv4.icmp_echo_ignore_all = 1

[Email protected] etc]#


Test

huangchao-macbookpro:~ hchao$ Ping a.b.c.d

PING a.b.c.d (a.b.c.d): Data bytes

Request Timeout for icmp_seq 0

Request Timeout for icmp_seq 1

Request Timeout for icmp_seq 2

Request Timeout for icmp_seq 3

Request Timeout for icmp_seq 4

Request Timeout for icmp_seq 5

Request Timeout for icmp_seq 6

Request Timeout for icmp_seq 7

Request Timeout for icmp_seq 8

^c

--- a.b.c.d ping Statistics---

Packets transmitted, 0 packets received, 100.0% packet loss

huangchao-macbookpro:~ hchao$


This article is from the "Huang Chao It Notes" blog, so be sure to keep this source http://huangchao.blog.51cto.com/10446378/1680794

"CentOS" Ping sysctl.conf

Related Article

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.