Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blahgeek/bgtr
Make custom traceroute result on a single linux box.
https://github.com/blahgeek/bgtr
Last synced: about 2 months ago
JSON representation
Make custom traceroute result on a single linux box.
- Host: GitHub
- URL: https://github.com/blahgeek/bgtr
- Owner: blahgeek
- Created: 2015-02-18T05:24:44.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-18T05:25:27.000Z (almost 10 years ago)
- Last Synced: 2023-06-06T15:36:21.483Z (over 1 year ago)
- Language: Python
- Homepage: http://blog.blahgeek.com/bgtr/
- Size: 289 KB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# bgtr
Make custom traceroute result on a single linux box.
![](happy.2015.png)
For more details, see [My Blog](http://blog.blahgeek.com/bgtr/) (Chinese)
## Try it
```
mtr -6 happy.2015.blahgeek.com
```## Howto
- Get a `/64` IPv6 pool, with rDNS support
- Using `ip6tables ... -j NFQUEUE` to queue specific packets to user space
- Drop those whose `hop limit` is less than NUM and send back an `Time Exceeded` ICMPv6 message, accept others## Step-by-step Howto
- Goto [Tunnel Broker](http://tunnelbroker.net), register an tunnel, configure it. For me, `2001:470:1f05:42c::/64` is routed to my VPS.
- Pick a destination IP address, let's say `2001:470:1f05:42c:2015::`. Run:```
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`
- Run `main.py` on 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](http://dns.he.net) to setup rDNS for each address.
- Bind `2001:470:1f05:42c:2015::` to a domain like `happy.2015.blahgeek.com`