Difference between revisions of "Traceroute notes"

From thelinuxwiki
Jump to: navigation, search
m (Nighthawk moved page Traceroute permissions to Traceroute notes without leaving a redirect)
Line 1: Line 1:
−
$ '''traceroute -I 4.2.2.2'''<br>
 
−
The specified type of tracerouting is allowed for superuser only<br><br>
 
  
−
Most Linux distros  don’t allow the –I switch for traceroute by regular users by default.  Traceroute would have to be configured by enabling the setuid bit or with a setcap modification.<br><br>  
+
 
 +
== permissions ==
 +
 
 +
$ '''traceroute -I 4.2.2.2'''<br>
 +
The specified type of tracerouting is allowed for superuser only<br><br>
 +
 
 +
Most Linux distros  don’t allow the –I switch for traceroute by regular users by default.  Traceroute would have to be configured by enabling the setuid bit or with a setcap modification.<br><br>  
  
 
example using setcap:<br>
 
example using setcap:<br>
−
Setting...<br>
+
Setting...<br>
 
  # '''setcap cap_net_raw+ep /usr/bin/traceroute'''
 
  # '''setcap cap_net_raw+ep /usr/bin/traceroute'''
  
−
viewing..<br>
+
viewing..<br>
 
  # '''getcap /usr/bin/traceroute'''<br>
 
  # '''getcap /usr/bin/traceroute'''<br>
 
  /usr/bin/traceroute = cap_net_raw+ep
 
  /usr/bin/traceroute = cap_net_raw+ep
  
 
for more info see manpages for setuid or setcap
 
for more info see manpages for setuid or setcap
 +
 +
== using icmp ==
 +
 +
$ '''traceroute -I 4.2.2.2'''
 +
 +
== specifying a port (tcp) ==
 +
$ '''sudo traceroute -T -p 443 -n -q 1 192.168.1.100'''
  
  
 
[[Category:linux]]
 
[[Category:linux]]

Revision as of 15:53, 1 November 2026


permissions

$ traceroute -I 4.2.2.2
The specified type of tracerouting is allowed for superuser only

Most Linux distros  don’t allow the –I switch for traceroute by regular users by default.  Traceroute would have to be configured by enabling the setuid bit or with a setcap modification.

example using setcap:

Setting...
# setcap cap_net_raw+ep /usr/bin/traceroute
viewing..
# getcap /usr/bin/traceroute
/usr/bin/traceroute = cap_net_raw+ep

for more info see manpages for setuid or setcap

using icmp

$ traceroute -I 4.2.2.2

specifying a port (tcp)

$ sudo traceroute -T -p 443 -n -q 1 192.168.1.100