1

I'm running Linux Mint 19.1 and I apt-get installed tor and it is running fine. However if I add the line

ExitNodes {us}

to /etc/tor/torrc and restart the tor service, the service starts successfully but tor doesn't work, by which I mean the socks proxy on port 9050 no longer has an internet connection.

To try to diagnose the problem, I added the following line

ControlPort 9051

to /etc/tor/torrc and ran this script.

With the ExitNodes line absent I get the expected output with 4 different circuits shown. With the ExitNodes line present I get no output at all.

I have tried different country codes and verified that exit nodes exist in those countries by looking at this list but nothing seems to work.

I have tried adding the StrictNodes 1 option as well without any difference.

Does anyone have any ideas how I can force an exit node from a specific country, or how to further diagnose this problem?

  • Without setting StrictNodes, can you post any warnings or relevant messages from your tor log? Also you should get the latest version from Tor's official repository as the version in your distribution is likely out of date. – Steve Apr 24 at 21:08
  • Where is the log file? The directory /var/log/tor exists but is empty. Do I have to enable logging? – hostage_squid Apr 24 at 22:54
  • OK, I found the relevant line in /etc/tor/torrc to enable debug logging. Thanks for pointing me in the right direction! – hostage_squid Apr 24 at 23:01
2

I uncommented the following line

Log debug file /var/log/tor/debug.log

in /etc/tor/torrc and restarted the tor service.

I then read the following 268 lines in to the debug.log file:

[warn] Failed to open GEOIP file /usr/share/tor/geoip.  We've been configured to use (or avoid) nodes in certain countries, and we need GEOIP information to figure out which ones they are. Do you have the tor-geoipdb package installed?

After running sudo apt install tor-geoipdb it worked fine.

| improve this answer | |
  • Good to hear! Also don't forget to disable the debug log when you're done as it can reduce the performance of your Tor client (lots of writing to disk, and for anonymity purposes). – Steve Apr 24 at 23:21

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.