Advertisement
teknoraver

af_icmp

Apr 15th, 2018
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. $ ll /usr/bin/ping
  2. -rwxr-xr-x. 1 root root 61K ago 3 2017 /usr/bin/ping
  3. $ ping -c1 192.168.85.1
  4. PING 192.168.85.1 (192.168.85.1) 56(84) bytes of data.
  5. 64 bytes from 192.168.85.1: icmp_seq=1 ttl=64 time=0.492 ms
  6.  
  7. --- 192.168.85.1 ping statistics ---
  8. 1 packets transmitted, 1 received, 0% packet loss, time 0ms
  9. rtt min/avg/max/mdev = 0.492/0.492/0.492/0.000 ms
  10. $ getcap /usr/bin/ping
  11. /usr/bin/ping = cap_net_admin,cap_net_raw+p
  12. $ sudo setcap -r /usr/bin/ping
  13. $ ping -c1 192.168.85.1
  14. ping: socket: Operation not permitted
  15. $ sudo sysctl -w net.ipv4.ping_group_range='0 1000'
  16. net.ipv4.ping_group_range = 0 1000
  17. $ ping -c1 192.168.85.1
  18. PING 192.168.85.1 (192.168.85.1) 56(84) bytes of data.
  19. 64 bytes from 192.168.85.1: icmp_seq=1 ttl=64 time=0.500 ms
  20.  
  21. --- 192.168.85.1 ping statistics ---
  22. 1 packets transmitted, 1 received, 0% packet loss, time 0ms
  23. rtt min/avg/max/mdev = 0.500/0.500/0.500/0.000 ms
  24. $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement