Back

linux - ping的问题 - socket operation not permitted

发布时间: 2021-01-16 01:53:00

好奇怪,我的机器突然不能用普通用户ping 了.

参考:https://forum.artixlinux.org/index.php/topic,1809.0.html

$ ping 59.110.226.103

ping: socket: Operation not permitted

解决办法: 
siwei@siweii5:/usr/local/bin$ sudo sysctl -w net.ipv4.ping_group_range="0 1000"

就可以了.

siwei@siweii5:/usr/local/bin$ ping 59.110.226.103
PING 59.110.226.103 (59.110.226.103) 56(84) bytes of data.
64 bytes from 59.110.226.103: icmp_seq=1 ttl=52 time=18.5 ms
64 bytes from 59.110.226.103: icmp_seq=2 ttl=52 time=18.1 ms

Back