Modify Traceroute Replies

Hi everyone, i want to modify ip information in the traceroute replies. Is it possible on Vyos? If possible, how can i do that?
Thank you in advance.

Can you explain a little bit more what you are trying to achieve? An example would be helpful.

For example here is the sample traceroute output on CPE1:

traceroute to 192.168.0.9 (192.168.0.9), 30 hops max, 60 byte packets
1 192.168.0.6 (192.10.0.6) 1.131 ms 0.788 ms 0.687 ms
2 192.168.0.9 (192.10.0.9) 1.452 ms 1.389 ms 1.371 ms

192.168.0.6 is my tunnel ip on CPE2. I want to modify this IP to eth1 interface IP.

CPE2 Interfaces:

eth0 172.10.10.101/24 u/u
eth1 100.100.210.5/28 u/u
eth2 192.0.2.3/24 u/u
lo 127.0.0.1/8 u/u
::1/128
vti1 192.168.0.2/30 A/D
vti2 192.168.0.6/30 u/u
vti3 192.168.0.10/30 u/u
vti4 192.168.0.13/30 A/D

Thanks.

But the IP addresses shown in the output of traceroute are not modifiable. They are a result of the routing path from source to destination address. If the next hop is 192.168.0.6, then that IP will be present in the traceroute output.

1 Like

I think it can be done with reverse dns, but I had wondered if the IP address can be changed by modifying with vyos.
thanks a lot for your time and support.
have a nice day!

In traceroute , a VPN tunnel will show up as a single hop.
Intermediate routers, which pass the encrypted traffic, aren’t visible at all
And remote router will source replies traceroute replies from interface talking to you, so it works as designed.

1 Like