termux / termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.
https://f-droid.org/en/packages/com.termux
Other
35.71k stars 3.74k forks source link

traceroute: socket: Operation not permitted #86

Closed thomasahle closed 8 years ago

thomasahle commented 8 years ago

I'm trying to run traceroute, but I get the error "traceroute: socket: Operation not permitted". I read #74 and it looked like I should maybe update termux-tools, so I did, but it didn't help:

$apt install termux-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
termux-tools is already the newest version (0.27).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ ping google.com
PING google.com (212.98.120.37) 56(84) bytes of data.
64 bytes from 212.98.120.37: icmp_seq=1 ttl=59 time=9.76 ms
64 bytes from 212.98.120.37: icmp_seq=2 ttl=59 time=14.9 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 9.761/12.366/14.971/2.605 ms
$ traceroute google.com
traceroute: socket: Operation not permitted
$
fornwall commented 8 years ago

It's not possible to have traceroute without root permissions unfortunately.

There is a non-root alternative in the tracepath utility:

$ apt update
$ apt install tracepath
$ tracepath google.com
1:  android-9cfccccc54b77f66                              1.077ms pmtu 1500
1:  router.asus.com                                       2.013ms 
1:  router.asus.com                                       1.194ms 
2:  gw10.a400.priv.bahnhof.se                             2.697ms 
3:  ti3080d400-xe0-1-2.ti.telenor.net                    12.424ms asymm  6 
4:  a400-gw-c.bahnhof.net                                 5.233ms 
5:  a400-gw.bahnhof.net                                  20.228ms 
6:  100.64.1.49                                           2.858ms 
7:  h-213-80-104-104.na.cust.bahnhof.se                   4.482ms 
8:  ste-cgn-ar1.sto-cr1.bahnhof.net                       4.119ms 
[...]