A client wants to add a fake hop when someone does a traceroute on his IP address. He has two ip addresses, and one interface (no problem, virtual interfaces solve it). How should I proceed? Is this even possible? I tried iptables forwarding but then it won't show up in a traceroute. I haven't tried other methods though (maybe some sort of bridging?)
Here is the current route shown in tracert: Person doing traceroute -> 220.127.116.11
Here is the planned traceroute result: Person doing traceroute -> 18.104.22.168 (fake hop) -> 22.214.171.124
Update: Added some formatting to clarify that it is not an xy problem. I am absolutely open to any solution, not just iptables (Be it a proper one or a dirty hack)
Edit: It's on one host only (Linux). I also want to do this. It doesn't have to be anything fancy. 126.96.36.199 just needs to show up on a traceroute.
My attempt - Not necessarily the right approach
Update: I tried bouncing off the packet from 188.8.131.52 to 184.108.40.206, then mangling it to decrease TTL, then forward it to 220.127.116.11 (Postrouting -j SNAT --to 18.104.22.168).
Edit: Here are the rules I tried, sensitive info removed:
# Generated by iptables-save v1.4.21 on Mon May 18 15:13:18 2015 *nat :PREROUTING ACCEPT [8:760] :INPUT ACCEPT [8:760] :OUTPUT ACCEPT [1:104] :POSTROUTING ACCEPT [1:104] -A POSTROUTING -p icmp -m icmp --icmp-type 8 -j SNAT --to-source 22.214.171.124 COMMIT # Completed on Mon May 18 15:13:18 2015 # Generated by iptables-save v1.4.21 on Mon May 18 15:13:18 2015 *mangle :PREROUTING ACCEPT [763:151106] :INPUT ACCEPT [763:151106] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [299:39396] :POSTROUTING ACCEPT [299:39396] -A FORWARD -i eth0 -o eth0:0 -p icmp -m icmp --icmp-type 8 -j TTL --ttl-dec 1 COMMIT # Completed on Mon May 18 15:13:18 2015 # Generated by iptables-save v1.4.21 on Mon May 18 15:13:18 2015 *filter :INPUT ACCEPT [839:179066] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [303:40704] -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT -A INPUT -p udp -m udp --dport 33434:33523 -j ACCEPT -A FORWARD -d 126.96.36.199/32 -o eth0 -p icmp -m icmp --icmp-type 8 -j ACCEPT COMMIT # Completed on Mon May 18 15:13:18 2015