Linux 禁ping

2020-07-06  本文已影响0人  清风徐来_0e1a

➜ ~ ping www.33xn.cn

PING www.33xn.cn (47.95.232.103): 56 data bytes

64 bytes from 47.95.232.103: icmp_seq=0 ttl=250 time=27.105 ms

64 bytes from 47.95.232.103: icmp_seq=1 ttl=250 time=27.354 ms

64 bytes from 47.95.232.103: icmp_seq=2 ttl=250 time=26.348 ms

禁Ping

修改服务器

# /etc/sysctl.conf

# 尾部追加, 下边这行 forbiden ping 1, allow 0

net.ipv4.icmp_echo_ignore_all=0

# 保存,然后执行

sysctl -p

➜ ~ ping www.33xn.cn

PING www.33xn.cn (47.95.232.103): 56 data bytes

Request timeout for icmp_seq 0

上一篇 下一篇

猜你喜欢

热点阅读