LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-11-2022, 04:12 PM   #1
Noob-Tech-Ninja
Member
 
Registered: Jan 2022
Posts: 30

Rep: Reputation: 2
Question Tor | Networking | Chosing exit nodes - fails |


​Hi there guys.

I was hoping that you could help answer a couple of queries for me please.


Issue / background:
I'm starting to tinker with Tor, and learn some more elements of secure networking.


I want to chose a specific exit node for some testing.
(I'd like the exit point to be in the UK, for this test).


However, when I edit the torc config file, Tor will attempt to launch
then fail with the following error message:


Code:
Tor exited during startup. This might be due to an error in your torrc file, a 
bug in Tor or another program on your system, or faulty hardware. Until you fix 
the underlying problem and restart Tor, Tor Browser will not start.
I have been following the guide below:
https://www.wikihow.com/Set-a-Specif...-a-Tor-Browser

Here is an example of the entry and exit nodes on the torc config file
that I was testing:
Code:
EntryNodes {ca} StrictNodes 1
ExitNodes {uk} StrictNodes 1
Troubleshooting steps:

1. I've tried to use both lowecase and uppercase for the country codes
in the curly brackets.

2. Use both 1 & 0 for the StrictNodes argument

3. Tried different countries in both the entry and exit nodes
E.G. {US} {FR} {NL}

Nothing seems to work. Tor will fail to launch properly.
(Just showing the error message).

4. However, once I delete my changes, and re-save the torc config file.
Tor will launch properly once again.


Questions:
Q1. What am I doing wrong ?
Q2. What do I need to do, in order to get this to work, please ?


TIA for any help or advice.


Useful details

OS: Ubuntu 18.04 LTS (64 bit)
DE: KDE 5.12.9
Kernel: 4.15.0-166 generic


Tor version: 11.03 (based upon Firefox 91.4.1.esr (64-bit) )
 
Old 01-11-2022, 08:33 PM   #2
chilibowl
Member
 
Registered: Sep 2002
Location: woodstock-kingston ,ny usa
Distribution: Started out w/Redhat 6.0,7.3,then Suse 8.2 , 9.2 ,10.open suse , KNOPPIX 2.73 &5.1 & Puppy
Posts: 164

Rep: Reputation: 15


oK -Little that I know about TOR -- try this websyte --- vonhagen.org ----- a fellow named Bill Von Hagen who wrote a book about accessing web portals with "hidden" software , tor and tails .Qube oS ,parrot Linux. the Web Darkly!!!!??


regards -chili
 
Old 01-12-2022, 01:15 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Noob-Tech-Ninja, the error message is very generic.
Your troubleshooting makes me think that your configuration is either wrong or too strict & specific, and tor cannot fulfil your request.

Are you sure {uk} and {ca} are valid identifiers?
Code:
man tor
says:
Quote:
Country codes are 2-letter ISO3166 codes
 
Old 01-13-2022, 06:01 PM   #4
Noob-Tech-Ninja
Member
 
Registered: Jan 2022
Posts: 30

Original Poster
Rep: Reputation: 2
Hi guys.

Thanks for the help so-far.

@ondoho

You're totally right, it appears that the country code format I was using was wrong
If I want to use the UK as an exit node I should be using {GB}


Here is the default torc congfig file (before I make any changes):
Code:
# This file was generated by Tor; if you edit it, comments will not be preserved
# The old torrc file was renamed to torrc.orig.1, and Tor will ignore it

ClientOnionAuthDir 
/home/noob/apps/tor/tor-browser_en-US/Browser/TorBrowser/Data/Tor/onion-auth
DataDirectory /home/noob/apps/tor/tor-browser_en-US/Browser/TorBrowser/Data/Tor
GeoIPFile 
/home/noob/apps/tor/tor-browser_en-US/Browser/TorBrowser/Data/Tor/geoip
GeoIPv6File 
/home/noob/apps/tor/tor-browser_en-US/Browser/TorBrowser/Data/Tor/geoip6
Where "noob" is my acutal username on my computer

So, I have tried some further testing -

5. Changed the exit nodes using the correct country code {GB} = Fails

6. Used different entry and exit nodes (with different countries) = Fails

7. Edited the torc file as root (using gedit that time) = Fails

So-far nothing works
 
Old 01-15-2022, 04:26 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
This looks like the torrc used by the Tor Browser Bundle, not tor by itself.
You should have said that this is about TBB.
I don't think you should be messing around with its torrc; or, you should consult TBB documentation on how to achieve what you want.

Also, there appears to be sth wrong with the line breaks, it should look like this:
Code:
ClientOnionAuthDir /home/noob/apps/tor/tor-browser_en-US/Browser/TorBrowser/Data/Tor/onion-auth
DataDirectory /home/noob/apps/tor/tor-browser_en-US/Browser/TorBrowser/Data/Tor
GeoIPFile /home/noob/apps/tor/tor-browser_en-US/Browser/TorBrowser/Data/Tor/geoip
GeoIPv6File /home/noob/apps/tor/tor-browser_en-US/Browser/TorBrowser/Data/Tor/geoip6
 
Old 01-17-2022, 01:29 PM   #6
Noob-Tech-Ninja
Member
 
Registered: Jan 2022
Posts: 30

Original Poster
Rep: Reputation: 2
Whats the difference between editing the torc file on the Tor CLI version
Vs the TBB ?

Are they not the same file, just in different locations (depending on the type
of Tor install that you do) ?
 
Old 01-18-2022, 12:04 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
I see now you mentioned TBB in your first post - sorry I thought otherwise - but you are conflagrating tor and the TBB, when those are two separate and distinct programs.

The error message in your first post is TBB complaining about tor itself.

Which torrc file did you edit? Where is it located?

How did you install TBB? /home/noob/apps/tor/tor-browser_en-US/ seems to be a non-standard location?
Can you delete /home/noob/apps/tor/tor-browser_en-US/ completely, recreate it (reinstall TBB), and start TBB normally?
Can you start TBB normally when you undo the changes you made to its torrc?
 
Old 01-18-2022, 12:17 PM   #8
Noob-Tech-Ninja
Member
 
Registered: Jan 2022
Posts: 30

Original Poster
Rep: Reputation: 2
08. Tor is installed in the following location:
/home/noob/apps/tor/tor-browser_en-US/

[I'm running Linux (Ubuntu 18.04 LTS)]


09. The torrc file is located here:
/home/noob/apps/tor/tor-browser_en-US/Browser/TorBrowser/Data/Tor/

10. I downloaded the Tor package (TBB ?) directly from the Tor website
(I also verified it using the SHA 256 sum)

11. I did delete the Tor / TBB browser software completely. and then
re-installed it. = Tor works fine, however I get the same errors when trying
to edit the torrc file

12. Yes - When I delete my changes, re-save the torrc file, then Tor works
properly once again.
 
Old 01-19-2022, 01:04 AM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
OK. Sorry it took so long, but basically we're back to post #1 and the message you're getting.
Basically, what you want is to route your traffic only from {CA} (Canada?) to {GB}, and nothing else. Maybe tor simply cannot find anything that meets these very strict requirements, and gives up after some time out? I'm a little hazy on how tor makes these decisions, butshould cast more light on the problem.

BTW, why does the entry node matter?
 
Old 01-25-2022, 03:24 PM   #10
Noob-Tech-Ninja
Member
 
Registered: Jan 2022
Posts: 30

Original Poster
Rep: Reputation: 2
13. The entry node doesn't matter, I had seen that used in an example in another guide
so I decided to use the same (seeing as it worked in the guide).

14. Success !!
I have gotten it working.

I removed the following line from the config file:
Code:
EntryNodes {CA} StrictNodes 1
and just left the exit node (as follows):
Code:
ExitNodes {GB} StrictNodes 1
And it worked perfectly.

I tested again using the Netherlands {NL} for the ExitNode, and agian it worked
brilliantly.

So many thanks for your time and patience, and helping me to get this sorted !

Last edited by Noob-Tech-Ninja; 01-29-2022 at 07:11 PM.
 
1 members found this post helpful.
Old 01-29-2022, 04:03 AM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Glad to be of help.
Please mark your thread SOLVED (see my signature). Others will benefit.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up Kickstart server RHEL 6.5 for compute nodes, GPU nodes and PHI nodes sho1sho1 Red Hat 3 06-23-2015 04:20 PM
LXer: Tor exit nodes face unusual activity, is Tor being raided or under hack attack? LXer Syndicated Linux News 0 12-23-2014 12:03 AM
LXer: SelekTOR : Apps Based on Java for Quickly Select Tor Exit Nodes by Country LXer Syndicated Linux News 0 09-28-2014 07:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration