ASTRACEROUTE(8)
β¨ ASTRACEROUTE(8) β¨ β the autonomous system trace route utility, bestie edition π¦
okay so before we even start: this is part of the netsniff-ng toolkit, and it's literally called astraceroute π
πΈ NAME πΈ
astraceroute</purgle> β autonomous system trace route utility
(yeah that's it, that's the whole name section, we're keeping it iconic)
π SYNOPSIS π
astraceroute [options]
that's the whole vibe. options only. no positional args, no drama.
π DESCRIPTION π
so astraceroute is this lil utility that gets you path information in a traceroute-ish way, except it ALSO serves you geographical location info on the side π. like, it tracks the route a packet takes from your local host all the way to the remote host by successively bumping up the IP's TTL field, starting from 1, and manifesting that every intermediate node will send an ICMP TIME_EXCEEDED notification back to your local host once the TTL value gets decremented down to 0. lowkey a whole relay race πβοΈ
astraceroute supports IPv4 AND IPv6 queries, and it'll display country and city info (if available), the AS number that hop belongs to, and its ISP name. it also gives you timing info and reverse DNS data, because why would it gatekeep π
and because astraceroute is soooo configurable, you can also gather some extra useful info about a hop regarding what it does and does not allow to pass through. how? by using clear text strings for probing DPIs or ``great firewalls'' to figure out whether they'll filter out blocked critical keywords. ngl this tool might be a really good starting point for further in-depth analysis of those kinds of systems π
β¨ OPTIONS β¨
-H <host>,--host <host>β hostname or IPv4 or IPv6 address of the remote host where the AS route should be traced to. if you're passing an IPv6 address or host, you must use-6. IPv4 is the default, no cap.-p <port>,--port <port>β TCP port for the remote host to use. if you don't specify, the default port is80.-i <device>,-d <device>,--dev <device>β networking device to start the trace route from, likeeth0,wlan0. yes you get two short flags, we love options π-b <IP>,--bind <IP>β IP address to bind to instead of the network device's address. for an IPv6 address you gotta specify-6.-f <ttl>,--init-ttl <ttl>β initial TTL value to be used. super handy if you're not interested in the first n hops and only want the ones after. default initial TTL is1.-m <ttl>,--max-ttl <ttl>β maximum TTL value to be used. unless you say otherwise, max TTL is30. once it hits that,astracerouteexits, periodt.-q <num>,--num-probes <num>β how many queries to do on a particular hop. default is2query requests.-x <sec>,--timeout <sec>β the probe response timeout in seconds, aka the max timeastraceroutewaits for an ICMP response from the current hop. default is3seconds.-X <string>,--payload <string>β drops an ASCII cleartext string into the packet payload. cleartext with whitespace in it has to go in quotes (e.g.:"censor me").-l <len>,--totlen <len>β total length of the packet. payload that doesn't have a cleartext string in it gets padded with random garbage ποΈ-4,--ipv4β use IPv4 only requests. this is the default.-6,--ipv6β use IPv6 only requests. must be used when passing an IPv6 host as an argument.-n,--numericβ tellsastracerouteto NOT do reverse DNS lookup for hop replies. the opposite option is-N.-u,--updateβ invokes the built-in geo-database update mechanism to grab Maxmind's latest version. to configure search locations for databases, the file/etc/netsniff-ng/geoip.confholds the possible addresses. so if you wanna save bandwidth or mirror Maxmind's databases (to dodge their traffic limit policy π), you can drop different hosts or IP addresses intogeoip.conf, separated by a newline.-L,--latitudeβ also show latitude and longitude of hops. π-N,--dnsβ tellsastracerouteto DO reverse DNS lookup for hop replies. the opposite option is-n.-S,--synβ use TCP'sSYNflag for the request.-A,--ackβ use TCP'sACKflag for the request.-F,--finβ use TCP'sFINflag for the request.-P,--pshβ use TCP'sPSHflag for the request.-U,--urgβ use TCP'sURGflag for the request.-R,--rstβ use TCP'sRSTflag for the request.-E,--ecn-synβ use TCP'sECNflag for the request.-t <tos>,--tos <tos>β explicitly specify IP's TOS.-G,--nofragβ set IP's no fragmentation flag.-Z,--show-packetβ show and dissect the returned packet. π¬-v,--versionβ show version information and exit.-h,--helpβ show user help and exit.
π USAGE EXAMPLE π
okay bestie, real talk, here's how you'd actually run this thing:
astraceroute -i eth0 -N -S -H netsniff-ng.org
this sends out a TCP SYN probe via the ''eth0'' networking device to the remote IPv4 host netsniff-ng.org. this request is most likely to pass. also, it tells astraceroute to do reverse DNS lookups for each hop. β
astraceroute -6 -i eth0 -S -E -N -H www.6bone.net
in this one, a TCP SYN/ECN probe for the IPv6 host www.6bone.net is being performed. again, the ''eth0'' device is being used, plus a reverse DNS lookup for each hop. π
astraceroute -i eth0 -N -F -H netsniff-ng.org
here we send out a TCP FIN probe to the remote host netsniff-ng.org. again, on each hop a reverse DNS lookup is done and the queries are transmitted from ''eth0''. IPv4 is used.
astraceroute -i eth0 -N -FPU -H netsniff-ng.org
like most of the other examples, we do a trace route to IPv4 host netsniff-ng.org, and this time we do a TCP Xmas probe π (yes that's the real name, we don't make the rules).
astraceroute -i eth0 -N -H netsniff-ng.org -X censor-me -Z
in this example we have a Null probe to the remote host netsniff-ng.org, port 80 (default), and this time we append the cleartext string "censor-me" into the packet payload to test whether a firewall or DPI will let this string pass. such a trace could be done once without and once with a blocked string to gather possible info about censorship. π΅οΈβοΈ
π«Ά NOTE π«Ά
if a TCP-based probe fails after a number of retries, astraceroute will automatically fall back to ICMP-based probes to pass through firewalls and routers used in load balancing, for example. it's got a whole backup plan, we stan resilience πͺ
to gather more information about astraceroute's displayed AS numbers, see e.g.: http://bgp.he.net/AS<number>.
π BUGS π
the geographical locations are estimated with the help of Maxmind's GeoIP database and can differ from the real physical location. to decrease the possible errors, update the database regularly using astraceroute's --update option. π
at some point in time, we need a similar approach to gather more reliable path information, such as in the paris-traceroute tool.
due to the generic nature of astraceroute, it currently has a built-in mechanism to stop the trace after a fixed number of hops, since the configurable TCP flags can have anything included. it is possible to decrease this number of course. in the future, if a SYN probe is sent out, there should be a listener so that we can stop the trace if we detect a handshake in progress. π
β LEGAL β
astraceroute is licensed under the GNU GPL version 2.0.
π HISTORY π
astraceroute was originally written for the netsniff-ng toolkit by Daniel Borkmann. it is currently maintained by Tobias Klauser <tklauser@distanz.ch> and Daniel Borkmann <dborkma@tik.ee.ethz.ch>. π«‘
π₯ SEE ALSO π₯
netsniff-ng(8), trafgen(8), mausezahn(8), ifpps(8), bpfc(8), flowtop(8), curvetun(8)
π AUTHOR π
manpage was written by Daniel Borkmann.
π§ COLOPHON π§
this page is part of the Linux netsniff-ng toolkit project. a description of the project, and info about reporting bugs, can be found at http://netsniff-ng.org/.
and that's the whole page, bestie! π this version of the manpage is from the Linux crew and it's dated 03 March 2013 β so yeah, retro but still serving. go trace some routes, ily, bye π¦β¨
π¦ where this page comes from
- arch rolling: netsniff-ng 0.6.9-2 Β· GPL-2.0-only
- debian bookworm: netsniff-ng 0.6.8-3 Β· GPL-2.0-only
- debian trixie: netsniff-ng 0.6.9-1 Β· GPL-2.0-only
- epel 10: netsniff-ng 0.6.9-2.el10_1 Β· GPL-2.0-only
- epel 9: netsniff-ng 0.6.8-11.el9 Β· GPLv2
- fedora 43: netsniff-ng 0.6.9-4.fc43 Β· GPL-2.0-only
- fedora 44: netsniff-ng 0.6.9-5.fc44 Β· GPL-2.0-only
- nixos 26.05: netsniff-ng 0.6.9
- nixpkgs unstable: netsniff-ng 0.6.9
- ubuntu jammy: netsniff-ng 0.6.8-2build1 Β· GPL-2.0-only
- ubuntu noble: netsniff-ng 0.6.8-3build2 Β· GPL-2.0-only
- ubuntu questing: netsniff-ng 0.6.9-1
- ubuntu resolute: netsniff-ng 0.6.9-2 Β· GPL-2.0-only
- ubuntu stonking: netsniff-ng 0.6.9-2build1 Β· GPL-2.0-only
- Copyright 2013 Daniel Borkmann
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms