Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ ll /usr/bin/ping
- -rwxr-xr-x. 1 root root 61K ago 3 2017 /usr/bin/ping
- $ ping -c1 192.168.85.1
- PING 192.168.85.1 (192.168.85.1) 56(84) bytes of data.
- 64 bytes from 192.168.85.1: icmp_seq=1 ttl=64 time=0.492 ms
- --- 192.168.85.1 ping statistics ---
- 1 packets transmitted, 1 received, 0% packet loss, time 0ms
- rtt min/avg/max/mdev = 0.492/0.492/0.492/0.000 ms
- $ getcap /usr/bin/ping
- /usr/bin/ping = cap_net_admin,cap_net_raw+p
- $ sudo setcap -r /usr/bin/ping
- $ ping -c1 192.168.85.1
- ping: socket: Operation not permitted
- $ sudo sysctl -w net.ipv4.ping_group_range='0 1000'
- net.ipv4.ping_group_range = 0 1000
- $ ping -c1 192.168.85.1
- PING 192.168.85.1 (192.168.85.1) 56(84) bytes of data.
- 64 bytes from 192.168.85.1: icmp_seq=1 ttl=64 time=0.500 ms
- --- 192.168.85.1 ping statistics ---
- 1 packets transmitted, 1 received, 0% packet loss, time 0ms
- rtt min/avg/max/mdev = 0.500/0.500/0.500/0.000 ms
- $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement