tracetrout

command module
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2018 License: MIT Imports: 25 Imported by: 0

README

TraceTrout CircleCI

TraceTrout is a HTTP(S) server that returns a reverse traceroute from the server to the client. It does this by piggybacking the established connection, modifying the outgoing TCP packets' TTL values while the server is sending the response.

Figure 1: 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

The above Docker image doesn't support IPv6. Use the hownetworks/tracetrout:ipv6 image if you're feeling adventurous and want to work with Docker and IPv6.

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL