0

You can edit torrc file in Windows version and add something like ExitNodes {US}. And this will make your Tor Browser connect to .us proxies only.

If you add this at the end of torrc file in /etc/tor/torrc and restart Tor service, it does not work.

Using torsocks just hangs or times out and you need to undo the torrc edit to make it work again.

I need to set my torsocks to connect to .us proxy in order to access .us only websites.

Solution for Windows: IP address in specific city

edit1: I tried adding this at the end of the torrc file:

ExitNodes {us}
StrictNodes 1

Restarting Tor service tor restart and running torsocks some_cmd etc hangs for couple minutes and then gives ERROR torsocks[2710]: Unable to resolve. Status reply: 4 (in socks5_recv_resolve_reply() at socks5.c:666).

edit2: My current solution is to spam torsocks -i until it connects to .us proxy by itself randomly, which is impractical, but it works.

edit3:

log:

Apr 30 11:56:32.000 [notice] Interrupt: exiting cleanly.
Apr 30 11:56:32.000 [notice] Tor 0.2.7.6 (git-605ae665009853bd) opening log file.
Apr 30 11:56:32.916 [warn] OpenSSL version from headers does not match the version we're running with. If you get weird crashes, that might be why. (Compiled with 1000207f: OpenSSL 1.0.2g  1 Mar 2016; running with 100020bf: OpenSSL 1.0.2k  26 Jan 2017).
Apr 30 11:56:32.936 [notice] Tor v0.2.7.6 (git-605ae665009853bd) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.2k and Zlib 1.2.8.
Apr 30 11:56:32.936 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Apr 30 11:56:32.936 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Apr 30 11:56:32.936 [notice] Read configuration file "/etc/tor/torrc".
Apr 30 11:56:32.940 [notice] Opening Socks listener on 127.0.0.1:9050
Apr 30 11:56:32.941 [notice] Opening Control listener on /var/run/tor/control
Apr 30 11:56:32.000 [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?
Apr 30 11:56:32.000 [warn] Failed to open GEOIP file /usr/share/tor/geoip6.  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?
Apr 30 11:56:32.000 [notice] Bootstrapped 0%: Starting
Apr 30 11:56:33.000 [notice] Bootstrapped 5%: Connecting to directory server
Apr 30 11:56:33.000 [notice] Bootstrapped 45%: Asking for relay descriptors
Apr 30 11:56:33.000 [notice] Signaled readiness to systemd
Apr 30 11:56:33.000 [notice] I learned some more directory information, but not enough to build a circuit: We need more microdescriptors: we have 7259/7259, and can only build 0% of likely paths. (We have 100% of guards bw, 100% of midpoint bw, and 0% of exit bw = 0% of path bw.)
Apr 30 11:56:34.000 [warn] Received http status code 404 ("Not found") from server '188.166.50.222:443' while fetching "/tor/keys/fp/585769C78764D58426B8B52B6651A5A71137189A+80550987E1D626E3EBA5E5E75A458DE0626D088C".
Apr 30 11:56:42.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying directory fetches again.
Apr 30 11:56:43.000 [notice] I learned some more directory information, but not enough to build a circuit: We need more microdescriptors: we have 7217/7257, and can only build 0% of likely paths. (We have 99% of guards bw, 99% of midpoint bw, and 0% of exit bw = 0% of path bw.)
Apr 30 11:56:43.000 [notice] Bootstrapped 50%: Loading relay descriptors
Apr 30 11:58:42.000 [notice] Tried for 120 seconds to get a connection to [scrubbed]:42. Giving up. (waiting for circuit)
2
  • Is there anything in the log file? You should be able to find it at /var/log/tor/log Apr 30, 2017 at 11:30
  • @PeterGerber log added. Apr 30, 2017 at 12:02

2 Answers 2

2

GeoIP needs to be installed for Tor to be able to determine in what country a exit relay is.

You can install it using sudo apt install tor-geoipdb.

From the logs:

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?".

Because it can't determine what relay is in what country, it can't find any in the {US} and as a result "0% of exit[s]" are usable for you.

1

~/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Tor

you need to go here and do the changes.

You must log in to answer this question.

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