Skip to content

Traceroute from behind NAT

2010 February 24
by Tedb0t

If you’re using a *nix or BSD-based operating system and trying to use traceroute at home behind a NAT router, you probably have problems with intermediate routers timing out, i.e.:

3  * * *
4  * * *
5  * * *
6  * * *

Furthermore, you may have also noticed that Windows’ tracert program doesn’t have this problem. The Unix traceroute program uses a bunch of UDP packets on a bunch of client ports to do its magic, whereas tracert uses ICMP packets, which I guess would have to be port forwarded on your router normally. Regardless, the solution is to use:

traceroute -I targethost.com

This forces traceroute to use ICMP packets the way the Windows program does. Amazing! I’m sure there’s a downside to this approach, but so far it works like a charm.

Related Posts:


One Response
  1. dude permalink
    October 5, 2012

    Really interesting, thank you!

Comments are closed.