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?

3
  • 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, 2020 at 21:08
  • Where is the log file? The directory /var/log/tor exists but is empty. Do I have to enable logging? Apr 24, 2020 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! Apr 24, 2020 at 23:01

1 Answer 1

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.

1
  • 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, 2020 at 23:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .