2

I might experience a bug here. I cannot select a specific country as exit node.

I am using debian 10 with a standalone torbrowser version 11.0.11 (I will update soon, but I don't think it is a version problem).

I have edited nano /tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc and added the line ExitNodes {de} StrictNodes 1 to have a german exit node as described here and there

After I have modified the torrc I start tor_browser. The first connection I do initiate with a webserver uses a german exit node. A few seconds late, the circuit changes and I use exit node all over the world again. Rechecking /tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc shows that my modifications are deleted.

What I tried so far:

  • revoke write permissions: chmod -w /tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc
  • chown torrc by root and give read to others.
  • instead of ExitNodes {de} StrictNodes 1 using ExitNodes {de} only

In every case the torrc file overwrites itself and loses my modifications. This shouldn't be possible when the file belongs to root while tor_browser is run by a normal non-root-user.

  1. Do you have any suggestions or a solution for me?
  2. Any clue what I do wrong?
1
  • I found out, that the settings were right. The problem was that tor-browser seems to ignore my exit node policy on certain websites only. I have opened a new question for this: tor.stackexchange.com/questions/23211/… Commented Jun 26, 2022 at 8:11

4 Answers 4

1

I have edited nano /tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc and added the line ExitNodes {de} StrictNodes 1 to have a german exit node as described here and there

The StrictNodes option does not apply to ExitNodes, so it's not needed here. (From the documentation: "StrictNodes does not apply to ExcludeExitNodes, ExitNodes, MiddleNodes, or MapAddress")

Rechecking /tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc shows that my modifications are deleted.

As mentioned in https://support.torproject.org/tbb/tbb-editing-torrc/, make sure Tor Browser is closed before you edit the torrc file, otherwise Tor Browser may overwrite your changes.

What I tried so far:

  • revoke write permissions: chmod -w /tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc
  • chown torrc by root and give read to others.
  • instead of ExitNodes {de} StrictNodes 1 using ExitNodes {de} only

In every case the torrc file overwrites itself and loses my modifications. This shouldn't be possible when the file belongs to root while tor_browser is run by a normal non-root-user.

It's true that if the file is owned by root and not writable by others, then other users can't write to the file. But other users can still delete the file and create a new file with different contents. If you want to prevent this, the directory must also not be writable by other users.

2
  • hi unfortunately this is what I am doing and I am still experiencing that the tor-browser changes its circuit on its own. Also I did realize that it modifies the torrc file but my command ExitNodes {de} is preserved. It just switches some line and in the first moment it looked like my modifications were lost. So i will open a new ticket to ask why only on certain websites the force exit node policy does not work Commented Jun 26, 2022 at 8:01
  • Here is my new question to that new topic: tor.stackexchange.com/questions/23211/… Commented Jun 26, 2022 at 8:10
1

this is list of all code country that will help you:(just click F3 and search you are country)

AD - Andorra FM - Micronesia (Federated States of) AE - United Arab Emirates KR - Korea (Republic of) AF - Afghanistan AG - Antigua and Barbuda AI - Anguilla AL - Albania AM - Armenia AO - Angola AQ - Antarctica AR - Argentina AS - American Samoa AT - Austria AU - Australia AW - Aruba AX - Åland Islands AZ - Azerbaijan BA - Bosnia and Herzegovina BB - Barbados BD - Bangladesh BE - Belgium BF - Burkina Faso BG - Bulgaria BH - Bahrain BI - Burundi BJ - Benin BL - Saint Barthélemy BM - Bermuda BN - Brunei Darussalam BO - Bolivia (Plurinational State of) BR - Brazil BS - Bahamas BT - Bhutan BV - Bouvet Island BW - Botswana BY - Belarus BZ - Belize CA - Canada CC - Cocos (Keeling) Islands CD - Congo (Democratic Republic of the) CF - Central African Republic CG - Republic of the Congo CH - Switzerland CI - Côte d'Ivoire CK - Cook Islands CL - Chile CM - Cameroon CN - China CO - Colombia CR - Costa Rica CU - Cuba CV - Cabo Verde CX - Christmas Island CY - Cyprus CZ - Czech Republic DE - Germany DJ - Djibouti DK - Denmark DM - Dominica DO - Dominican Republic DZ - Algeria EC - Ecuador EE - Estonia EG - Egypt EH - Western Sahara ER - Eritrea ES - Spain ET - Ethiopia FI - Finland FJ - Fiji FK - Falkland Islands (Malvinas) FO - Faroe Islands FR - France GA - Gabon GB - United Kingdom of Great Britain and Northern Ireland GD - Grenada GE - Georgia (country) GF - French Guiana GG - Guernsey GH - Ghana GI - Gibraltar GL - Greenland GM - Gambia GN - Guinea GP - Guadeloupe GQ - Equatorial Guinea GR - Greece GS - South Georgia and the South Sandwich Islands GT - Guatemala GU - Guam GW - Guinea-Bissau GY - Guyana HK - Hong Kong HM - Heard Island and McDonald Islands HN - Honduras HR - Croatia HT - Haiti HU - Hungary ID - Indonesia IE - Republic of Ireland IL - Israel IM - Isle of Man IN - India IO - British Indian Ocean Territory IQ - Iraq IR - Iran (Islamic Republic of) IS - Iceland IT - Italy JE - Jersey JM - Jamaica JO - Jordan JP - Japan KE - Kenya KG - Kyrgyzstan KH - Cambodia KI - Kiribati KM - Comoros KN - Saint Kitts and Nevis KP - North Korea KW - Kuwait KY - Cayman Islands KZ - Kazakhstan LA - Lao People's Democratic Republic LB - Lebanon LC - Saint Lucia LI - Liechtenstein LK - Sri Lanka LR - Liberia LS - Lesotho LT - Lithuania LU - Luxembourg LV - Latvia LY - Libya MA - Morocco MC - Monaco MD - Moldova (Republic of) ME - Montenegro MG - Madagascar MH - Marshall Islands MK - Republic of Macedonia ML - Mali MM - Myanmar MN - Mongolia MO - Macao MP - Northern Mariana Islands MQ - Martinique MR - Mauritania MS - Montserrat MT - Malta MU - Mauritius MV - Maldives MW - Malawi MX - Mexico MY - Malaysia MZ - Mozambique NA - Namibia NC - New Caledonia NE - Niger NF - Norfolk Island NG - Nigeria NI - Nicaragua NL - Netherlands NO - Norway NP - Nepal NR - Nauru NU - Niue NZ - New Zealand OM - Oman PA - Panama PE - Peru PF - French Polynesia PG - Papua New Guinea PH - Philippines PK - Pakistan PL - Poland PM - Saint Pierre and Miquelon PN - Pitcairn PR - Puerto Rico PS - State of Palestine PT - Portugal PW - Palau PY - Paraguay QA - Qatar RE - Réunion RO - Romania RS - Serbia RU - Russian Federation RW - Rwanda SA - Saudi Arabia SB - Solomon Islands SC - Seychelles SD - Sudan SE - Sweden SG - Singapore SH - Saint Helena, Ascension and Tristan da Cunha SI - Slovenia SJ - Svalbard and Jan Mayen SK - Slovakia SL - Sierra Leone SM - San Marino SN - Senegal SO - Somalia SR - Suriname ST - Sao Tome and Principe SV - El Salvador SY - Syrian Arab Republic SZ - Swaziland TC - Turks and Caicos Islands TD - Chad TF - French Southern Territories TG - Togo TH - Thailand TJ - Tajikistan TK - Tokelau TL - Timor-Leste TM - Turkmenistan TN - Tunisia TO - Tonga TR - Turkey TT - Trinidad and Tobago TV - Tuvalu TW - Taiwan TZ - Tanzania, United Republic of UA - Ukraine UG - Uganda UM - United States Minor Outlying Islands US - United States of America UY - Uruguay UZ - Uzbekistan VA - Vatican City State VC - Saint Vincent and the Grenadines VE - Venezuela (Bolivarian Republic of) VG - British Virgin Islands VI - United States Virgin Islands VN - Viet Nam VU - Vanuatu WF - Wallis and Futuna WS - Samoa YE - Yemen YT - Mayotte ZA - South Africa ZM - Zambia ZW - Zimbabwe 
1
  • This list is super useful. Commented Apr 5, 2024 at 15:29
0

Go to: Tor Browser\Browser\TorBrowser\Data\Tor\torrc-defaults

and make a copy of this text file now open "torrc-defaults" file in notepad and add below all the text this command:

EntryNodes {us} StrictNodes 1 MiddleNodes {us} StrictNodes 1 ExitNodes {us} StrictNodes 1 

after you add this commands your tor use only US SERVER for normal brows but if you go to onion website it will be random servers of tor

if you like to change the country change the XX:

EntryNodes {XX} StrictNodes 1 MiddleNodes {XX} StrictNodes 1 ExitNodes {XX} StrictNodes 1 

you can change to any country server

if you like to turn off the custom server notes you just need to add : "#" in on the start of the command like that:

# EntryNodes {us} StrictNodes 1 # MiddleNodes {us} StrictNodes 1 # ExitNodes {us} StrictNodes 1 

that will make sure that you will use random server again

0

Adding my silly struggle here. I'm on Linux fyi.

Installation: Torbrowser-Launcher

I modified /etc/tor/torrc which does not work for Tor browser. That file is intended for the Tor service that you start manually in the terminal I presume.

Modifying $HOME/.local/share/torbrowser/tbb/x86_64/tor-browser/Browser/TorBrowser/Data/Tor/torrc had no effect for me.

What worked was modifying $HOME/.local/share/torbrowser/tbb/x86_64/tor-browser/Browser/TorBrowser/Data/Tor/torrc-defaults,
by adding ExitNodes {us} StrictNodes 1 at the bottom,
save file, restart Tor browser.

Installation: From website zip

(edit: 05-04-2024)

Surprisingly, installing from zip, the strategy above didn't work, rather it works like it should. I guess they fixed it.

Now, forget about torrc-defaults, and just work with torrc in (different) directory $HOME/.local/share/torbrowser/Browser/TorBrowser/Data/Tor.

1
  • 1
    this is one of the most ridiculous Tor Browser's bugs - inability to specify the config file strictly or, which sounds even more sane, preliminary check for a default config like /etc/tor/torrc Commented Dec 19, 2023 at 15:39

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.