Visualization: Tor nodes on Google Maps and Google Earth

I wrote a small Python script to visualize Tor relays on Google Maps and Google Earth. You can see the result here:

The markers might give a false impression of accuracy. Most IPs can only be tracked to city level (or even region), ie. the markers are somewhat near, not necessarily at the real location of the relay.


How can Tor be an anonymity system if one can easily map Tor nodes? All regular Tor relays need to public, in order for the software to find and use them. Clients are not in any way trackable and thus are not on the map. Also, just because your node appears on the map, it does not at all mean your anonymity is compromised. To the contrary, if you allow forwarding of traffic for other people, your own anonymity inside the network might even improve.
The following steps are performed by the Python script:
1. Extract information about Tor relays from cached consensus and descriptor files.
2. Use MaxMind’s free GeoIP database to map their IPs to cities.
3. Generate XML-based KML file.
You can find the script in my Git repository: https://github.com/moba/tormap (LGPL)
First I wanted to display markers sized relative to the speed of the node, but it turns out that Google Maps does not support anything like that, so I chose to use a few colors/groups for now:
Exits >1MB/s Exits <1MB/s Stable middle nodes >1MB/s Stable middle nodes <1MB/s Other (unstable)
This is a one-time snapshot and I will not update it regularly, unless there is public interest to do so. The bandwidth categories are based on the reported “observed bandwidth” at the time of creation, so the actual number of high bandwidth nodes will fluctuate every time the script is run. It would be nice to extend this script to use longer-term bandwidth calculation like TorStatus does, and to generate a map over time using all the consensus data provided at [url=http://archive.torproject.org/]http://archive.torproject.org/[/url]. An example of what could be done is [url=http://labs.vis4.net/wikileaks/mirrors/]Vis4Net’s Wikileaks Mirror World Map[/url]. I’ll try to do that together with Gregor from Vis4 over Christmas.
P.S. Yes, there is not a single Tor node in Iceland yet! If you want to fund the first Icelandic Tor exit, let me know and I’ll set everything up. Traffic on an island is not cheap, but I can get a pretty good deal at one of their data centers (12€ per Mbps).
If you like Tor, please run a node yourself, and consider donating to [url=http://www.torservers.net]torservers.net[/url]. They maintain one of largest exit nodes with over 300 Mbit/s.

You may also like...

6 Responses

  1. flunkey says:

    Kent Backmann wrote suche a script too, but without the classes.
    https://b.kentbackman.com/2010/10/04/view-tor-exit-nodes-in-google-earth/

  2. Moritz says:

    Thanks, I did not know about that. He did not publish the script though, and – apart from the missing classes/categories – the placemarks only show the IP, no additional information whatsoever (bandwidth, version, exit policy etc).

  3. flunkey says:

    Thats right, just wanted to give a hint that something similar are existing. I will give him a hint too. Maybe he find your more advanced script usefull.

  4. Moritz – I like your script better!
    My script uses a paid GeoIP account to (hopefully) get better locations. Am not convinced of that. Plus, my script was not so neat.

  5. TF says:

    I believe the correct URL for the script is: http://www.torservers.net/misc/tormap/tormap.py
    It’s returning a 404 on the address you have on the post Moritz.

Leave a Reply

Your email address will not be published. Required fields are marked *


seven − = 2

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>