Blog Graphic

Controlling Tor Exit Nodes

Alan Burwell

If you’ve ever been into a casino and risked your own hard earned money, you’re well aware of the consequences of random outcomes – you just can’t control it. At the casino, most will either accept this and play, or walk away, why a few will try and work out strategies. I do not come bearing any gambling strategies, but I am here to tell you that within the random nature of the Tor network, there are a few things you can do to influence the outcome. We’re talking of course about added control over your Tor exit nodes.

If you’re not overly familiar with Tor, that’s ok. I’ll encourage you to check out our ‘about Tor’ section here: https://www.anonabox.com/what-is-tor.html, as well as to leverage torproject.org for basic and in depth info on what the Tor Network is and what it can do. For the purposes of this conversation, it will suffice it to know that in general applications your traffic is routed through a series of volunteer maintained servers all over the world in a randomized fashion. The result of which is the appearance of your traffic originating from a remote location, which is a large part of how you can remain anonymous.

But with potentially limitless options, the general Tor user has no way of controlling the location in which their traffic now appears to be coming from. For any number of reasons, user may prefer to have the ability to exclude certain regions, or perhaps even specify a particular country they want their IP address to appear as. I won’t speculate as to why this control may be desired. Suffice it to say the reasons are likely as varied as the server locations. So if you’re looking for a little more control over your IP location when you’re using Tor with an Anonabox device, here is your answer.

Let’s start by restricting your Tor exit node location to a particular country. It’s pretty easy.

In the admin interface, click the 'Services' dropdown menu and then select 'Tor'.

Screenshot

Then in the tor interface, click on the advanced tab.

Screenshot

On that page you will see the full text of your torrc file, which is the configuration file for Tor.

Scroll down to the bottom of that file and add two lines like this:

ExitNodes {ca}
StrictNodes 1

Screenshot

Then scroll down and click the 'save' button.

The page will refresh, and you can confirm that the change you made is now in the file by making sure you’re still on the ‘Advanced Configurations’ tab and scrolling down to the bottom once again.

After that, click the tab labeled 'Tor Status' to take you back to the regular Tor info page.

Click the button 'Restart Tor'. Note the change you made to the torrc configuration file in the previous step will not take effect until you click that 'restart tor' button. 

Screenshot

What did I just do?

In the example above, you have forced Tor to choose exit nodes in Canada, which is represented by {ca}. You will use this syntax to specify whichever country you choose. Here is a link to a complete list of country codes, as well as some additional reading: http://www.b3rn3d.com/blog/2014/03/05/tor-country-codes/

Similarly, you can employ a technique called geolocation blacklisting, to exclude a country from the available list of Tor server locations. To exclude a particular country access the torrc file just as you did when specifying a location. Scroll down to the bottom of the file and instead insert:

ExcludeExitNodes {us}

Screenshot

As before, click ‘Save’ and then return to the ‘Tor Status’ tab and click ‘Restart Tor’.

In this example, you have excluded the USA from the available list of server locations. You can use http://www.b3rn3d.com/blog/2014/03/05/tor-country-codes/ to reference additional country codes and will use the same syntax as our example, just replacing the country code {us}.

Share this post

Comments