I'm a Tor newbie. I've installed tor and tor-browser on Ubuntu 12.04 machine. It launches well and seems to work as expected. I wanted to set my exit node in the country of my choosing and found the ExitNodes directive followed by {us} should do it. So I added ExitNodes {us} to the very end of my /etc/tor/torrc and did a sudo service tor restart. I restarted the tor-browser but when navigating to https://dnsleaktest.com/, it still tells me I'm somewhere else (in Switzerland). Why is this and how do I use the ExitNodes correctly?

The repo I got my instance from is deb-src http://deb.torproject.org/torproject.org precise main

  • I imagine the problem is that, in general, geolocating an IP address is/can be inherently inaccurate. What's the address of your current exit node? – Richard Horrocks Mar 5 '16 at 22:33
  • @RichardHorrocks I currently get: as returned by ipchicken.com but dnsleaktest.com gives me – cerr Mar 5 '16 at 22:42
  • Are they in two different tabs, or the same tab (without closing)? If different tabs, then the circuits will be different, so different IPs are (probably) expected. I'm getting France and Germany for those IPs. I think one of the below answers makes sense: try downloading the Tor Browser from the main Tor site, not from a repository. Don't run a standalone Tor client as a service - just run directly from the folder you download and unzip. Finally, edit tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc, not the one in /etc/. – Richard Horrocks Mar 5 '16 at 23:00

Also add StrictNodes 1 to your torrc.

  • HI nobody, I did this & restarted the tor service & browser and dnsleaktest.com still tells me Hello from France – cerr Feb 29 '16 at 14:01
  • What's the Tor version in official Ubuntu repo? You might need to update Tor. See tor.stackexchange.com/questions/6812/… – nobody Mar 1 '16 at 4:51
  • $ tor --verify-config Feb 29 21:45:49.781 [notice] Tor v0.2.7.6 (git-605ae665009853bd) – cerr Mar 1 '16 at 5:46
  • You definitely need to update Tor and configure it properly. Note that tor-browser has its own Tor instance. – nobody Mar 2 '16 at 5:12
  • Sorry, my browser truncated the line so I saw its version wrongly. It is the latest version, and maybe you should check if your tor-browser is configured to use that Tor instance. – nobody Mar 3 '16 at 5:06

Tor and Tor Browser are two different things. The Tor software uses /etc/tor/torrc as a configuration file and is system-wide available. Tor Browser uses the file Browser/TorBrowser/Data/Tor/torrc in your local drive (where Tor Browser is installed). Both files are different and if you edit one those changes don't affect the other.

If you want to make settings in Tor Browser use Browser/TorBrowser/Data/Tor/torrc in your local drive, edit the file and restart To Browser.

Furthermore it is important to also set StrictNodes to 1.


Is tor-browser a package that you've installed from some dodgy third party repo? If so, uninstall it! Almost all of these packages are done wrong and none of them are officially supported.

If you want to install a package for Tor Browser, I'd recommend using Micah Lee's torbrowser-launcher, which will handle the downloading, verification and extraction of Tor Browser.

The second point is that editing /etc/tor/torrc will not affect a stock Tor Browser install, it ships with and launches it's own instance of tor which includes it's own torrc configuration file.

Once you've installed Tor Browser you'll find the appropriate torrc file inside the Tor Browser folder than extracted at Browser/TorBrowser/Data/Tor/torrc, this is where you will want to make these edits. For example, mine is located at ~/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Tor, which is where torbrowser-launcher extracts it to.

Keep in mind that IP addresses don't really map to geographic locations and that all GeoIP is inaccurate guesswork at best, the internet doesn't really work like that :) You will likely exit from many other places than those that you allow or from inside places that you restrict.

  • see EDIT 1 above – cerr Mar 5 '16 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.