dstnat and traceroute

I am attempting to redirect any traffic sent to a.a.a.a to b.b.b.b. Both addresses are public internet addresses. LAN devices are masqueraded behind the router with a private IP block, and the router itself is behind several layers of carrier-grade nat.

My rule is:

/ip firewall nat add action=dst-nat chain=dstnat dst-address=a.a.a.a to-addresses=b.b.b.b

This appears to work (I have more testing to do), but there’s something strange. When I run a traceroute on a system that’s on the LAN, it looks like this:


[root@allstar ~]# traceroute a.a.a.a
traceroute to a.a.a.a (a.a.a.a), 30 hops max, 60 byte packets
 1  a.a.a.a (a.a.a.a)  0.619 ms  0.824 ms  0.728 ms
 2  a.a.a.a (a.a.a.a)  11.594 ms  11.561 ms  10.981 ms
 3  a.a.a.a (a.a.a.a)  28.724 ms  28.641 ms  28.557 ms
 4  a.a.a.a (a.a.a.a)  11.909 ms  12.386 ms  12.297 ms
 5  a.a.a.a (a.a.a.a)  20.764 ms  20.679 ms  18.792 ms
 6  a.a.a.a (a.a.a.a)  21.615 ms  17.208 ms  18.920 ms
 7  a.a.a.a (a.a.a.a)  25.665 ms  25.573 ms  27.719 ms
 8  a.a.a.a (a.a.a.a)  30.184 ms  29.835 ms  27.282 ms
 9  a.a.a.a (a.a.a.a)  24.179 ms  21.970 ms  22.715 ms
10  a.a.a.a (a.a.a.a)  25.860 ms  24.878 ms  26.059 ms
11  a.a.a.a (a.a.a.a)  23.524 ms  23.490 ms  34.203 ms
12  a.a.a.a (a.a.a.a)  27.287 ms  25.760 ms  25.784 ms
13  a.a.a.a (a.a.a.a)  25.769 ms  25.716 ms  25.100 ms
14  a.a.a.a (a.a.a.a)  26.751 ms  26.551 ms  26.043 ms
15  a.a.a.a (a.a.a.a)  23.106 ms !X  26.358 ms !X  26.397 ms !X
[root@allstar ~]#

The number of hops is correct for b.b.b.b, the ping time is on-par with what’s normal to b.b.b.b, yet every single hop shows a.a.a.a.

Is this normal, or did I miss something?

This happens exactly because of your NAT rule…
Traceroute will not detect any NAT…

That makes sense to me. So, do you believe my NAT rule will otherwise have the intended effects?

So, do you believe my NAT rule will otherwise have the intended effects?

If you wonder if the rule is working, yes…

Thanks. I’m doing this in a test environment right now, still playing around with it. It seems to be working, but never a bad idea to have a fresh pair of eyes on something :slight_smile: