Make traceroute use ICMP packets

May 15, '05 01:37:00AM

Contributed by: timhaigh

Some routers and firewalls do not let out traceroute packets unless they are configured to allow traceroute UDP packets out. On most Unix systems, you use the -I option to make traceroute use ICMP packets. These normally get through routers and firewalls without the need of any special configeration.

However, the verson of traceroute that uses the -I option has only just made it to the Mac in Tiger. The version included in Jaguar and Panther does not allow you to use the -I option, and I had to recompile traceroute to make this work in those releases. If you want this functionality in 10.2 or 10.3, I built a packaged binary installer [63KB] you can download and install.

Typing man traceroute will show you the new -I option. As an example, type this to use ICMP packets to run a traceroute to apple.com:

traceroute -I www.apple.com
[robg adds: I haven't tested the precompiled binary package for 10.2/10.3]

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050504141255753