Make custom traceroute result on a single linux box.
For more details, see My Blog (Chinese)
mtr -6 happy.2015.blahgeek.com
- Get a
/64IPv6 pool, with rDNS support
ip6tables ... -j NFQUEUEto queue specific packets to user space
- Drop those whose
hop limitis less than NUM and send back an
Time ExceededICMPv6 message, accept others
- Goto Tunnel Broker, register an tunnel, configure it. For me,
2001:470:1f05:42c::/64is routed to my VPS.
- Pick a destination IP address, let's say
ip6tables -t nat -I PREROUTING -d 2001:470:1f05:42c:2015:: -j NFQUEUE --queue-num 1
So that all packets to
2001:470:1f05:42c:2015:: will be queued to user space (queue 1).
- Install python requirements:
pip install NetfilterQueue scapy
main.pyon root. Change
PREFIX=to your own IPv6 prefix.
Now, try run
mtr 2001:470:1f05:42c:2015:: from another machine and see the result. And finally you may want to make it prettier:
- Set rDNS Delegations to dns.he.net at Tunnel Broker, goto HE.net DNS to setup rDNS for each address.
2001:470:1f05:42c:2015::to a domain like