traceroute behind NAT router

Captain Code

Moderator
Staff member
Mod
Has anyone been able to get the traceroute command to work behind a hardware NAT router?

I haven't been able to get it working for as long as I've had OSX.

I should also note, that my PC running windoze 2000 will tracert, so it's not my network.
 
Does it start timing out immediately? As in,
Code:
$ traceroute www.apple.com
traceroute to www.apple.com.akadns.net (17.254.0.91), 30 hops max, 40 byte packets
1  * * *

Also, does using the -v say anything useful?

I don't have a hardware NAT router, mine is an OpenBSD machine, but tracerouting from my internal OS X machine to anywhere works.
 
Yep, that's what it does, times out at the first hop(well really second hop, since my router is the first hop).

I'm not sure what the -v switch is supposed to do, but it doen't change the output of the traceroute at all for me.

Thanks for the reply.


Here's my traceroute:

[localhost:~] dferns% traceroute -v www.apple.com
traceroute to www.apple.com.akadns.net (17.254.0.91), 30 hops max, 40 byte packe
ts
1 router (192.168.123.254) 36 bytes to 192.168.123.1 1.555 ms 1.174 ms 1.60
2 ms
2 * * *
3 * * *
 
Well, if Windows' tracert works but a Unix traceroute doesn't, then I'd say your NAT doesn't like traceroute's methods; basically, traceroute sends out UDP packets to elicit responses, whereas Windows uses ICMP to elicit those responses. This may or may not help with your particular NAT hardware.
 
Hmm, you must be right about that. I can't seem to get my router to work with the UDP packets even though I don't have anything blocked from the inside.

Oh well, it's no big deal I suppose.
 
I can't speak for Windows since I'm at work, but my two linux boxes and os x will not traceroute behind my linksys router.
 
Originally posted by howardm4
As a point, the Asante router used to fail
traceroute packets too but the latest firmware
passes them.

Excellent, thanks, the new firmware version (2.5) works with the traceroute's UDP packets!:D

About a month ago, I checked for new firmware updates, but there were none.
 
Also, I'd just like to say how much FASTER the reverse DNS lookup of each hop is compared to the windows tracert.
 
Back
Top