TraceTrout
A dramatization of a rainbot trout swimming against the data stream.
Quickstart
$ docker run -ti --rm -p 8080:8080 --cap-add NET_ADMIN hownetworks/tracetrout
A Less Quick Start
Prerequisites
The code is designed to run on Linux. Also ensure that iptables
and libnetfilter-queue1
packages are installed:
$ apt-get install iptables libnetfilter-queue1
Modify your iptables:
$ iptables -A OUTPUT -p tcp --sport 8080 -j NFQUEUE --queue-num 0
$ iptables -A INPUT -p tcp --dport 8080 -j NFQUEUE --queue-num 0
$ iptables -A INPUT -p icmp --icmp-type time-exceeded -j NFQUEUE --queue-num 0
$ iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
Compiling
Compilation requires the libnetfilter-queue-dev
package and Go 1.8 or later.
$ apt-get install libnetfilter-queue-dev
$ go build
Running
To start listening on port 8080:
$ ./tracetrout
Prior Art