Opened 9 years ago

Closed 8 years ago

Last modified 7 years ago

#2357 closed defect (not a bug)

ReachableAddresses ignored when playing with bridges using Vidalia

Reported by: anonym Owned by: arma
Priority: Medium Milestone: Tor: 0.2.2.x-final
Component: Core Tor/Tor Version: Tor: 0.2.1.26
Severity: Keywords: tor-bridge
Cc: anonym, amnesia@… Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by arma)

I think this possible bug is best illustrated with an example. I do this using Tor 0.2.1.28 (not currently present in Version list) and Vidalia 0.2.10:

  1. I clear the Tor data dir ("rm /var/lib/tor/*" in my case) and add "ReachableAddresses reject *:*" to torrc.
  2. I start Tor. ReachableAddresses prevents it from bootstrapping as expected.
  3. I start Vidalia and add a bridge. Tor immediately bootstraps and all connections to the Tor network are made through the bridge (verified with packet sniffer) as expected (except that the bridge connection is exempt from ReachableAddresses, see ticket #2356).
  4. I restart Tor. Tor hangs on "Bootstrapping 85%" according to the log, accompanied by the notices:

Notice: no known bridge descriptors running yet; stalling

and

Notice: Our directory information is no longer up-to-date
enough to build circuits: No live bridge descriptors.

What's Tor's problem with the bridge (I have verified that the bridge works on another system)?

  1. I disable bridges in Vidalia. Now Tor immediately bootstraps by connecting _directly_ to the Tor network, ignoring the ReachableAddresses options still present in torrc. I have verified that the connection is direct using a packet sniffer.

Why is ReachableAddresses suddenly ignored?

  1. I restart Tor and Vidalia (bridges still off). Tor still connects to the Tor network, ignoring ReachableAddresses.

Again, why is ReachableAddresses suddenly ignored?

  1. I stop Tor and Vidalia, clear Tor's data dir, and then start Tor and Vidalia (again, no bridges). Now the behaviour is the same as in point 2 and everything works as expected.

But why does clearing the Tor data dir make a difference?

Here's the original post about this issue on the T(A)ILS development mailing list, but I think all relevant information is posted above: http://article.gmane.org/gmane.linux.distributions.tails.devel/83

Child Tickets

Change History (9)

comment:1 Changed 9 years ago by T(A)ILS developers

Cc: amnesia@… added

comment:2 Changed 9 years ago by arma

Component: Tor ClientTor Bridge
Description: modified (diff)

comment:3 Changed 8 years ago by arma

Milestone: Tor: 0.2.2.x-final
Owner: set to arma
Priority: normalmajor
Status: newassigned

comment:4 in reply to:  description ; Changed 8 years ago by arma

Replying to anonym:

I think this possible bug is best illustrated with an example. I do this using Tor 0.2.1.28 (not currently present in Version list) and Vidalia 0.2.10:

  1. I clear the Tor data dir ("rm /var/lib/tor/*" in my case) and add "ReachableAddresses reject *:*" to torrc.
  2. I start Tor. ReachableAddresses prevents it from bootstrapping as expected.

Ok.

  1. I start Vidalia and add a bridge. Tor immediately bootstraps and all connections to the Tor network are made through the bridge (verified with packet sniffer) as expected (except that the bridge connection is exempt from ReachableAddresses, see ticket #2356).

See my explanation on #2356: when you click 'ok' from Vidalia, Vidalia sets your ReachableAddresses as well as your Bridges, to the settings you've configured with Vidalia.

  1. I restart Tor. Tor hangs on "Bootstrapping 85%" according to the log, accompanied by the notices:

Notice: no known bridge descriptors running yet; stalling

and

Notice: Our directory information is no longer up-to-date
enough to build circuits: No live bridge descriptors.

What's Tor's problem with the bridge (I have verified that the bridge works on another system)?

How did you restart Tor? Presumably from inside Vidalia, by clicking 'stop tor' and 'start tor'? Is your Vidalia/Tor configuration such that when you finished step 3, it overwrite Tor's torrc file? If yes, your ReachableAddresses line should be gone. If no, Vidalia remembered the changes it tried to get your Tor to saveconf, and applied them anew the next time you asked it to start Tor.

  1. I disable bridges in Vidalia. Now Tor immediately bootstraps by connecting _directly_ to the Tor network, ignoring the ReachableAddresses options still present in torrc. I have verified that the connection is direct using a packet sniffer.

Why is ReachableAddresses suddenly ignored?

Because your Vidalia reset it.

  1. I restart Tor and Vidalia (bridges still off). Tor still connects to the Tor network, ignoring ReachableAddresses.

Again, why is ReachableAddresses suddenly ignored?

Depends exactly how you restarted them. In any case, same reason as above. The more general challenge here is that Vidalia is a replacement for manually editing your torrc file, not a complement.

  1. I stop Tor and Vidalia, clear Tor's data dir, and then start Tor and Vidalia (again, no bridges). Now the behaviour is the same as in point 2 and everything works as expected.

But why does clearing the Tor data dir make a difference?

My guess is that it doesn't. I think you'll need to be more precise on what order you're restarting things, and whether Vidalia is starting your Tor (in which case it'll configure it for you too).

Here's the original post about this issue on the T(A)ILS development mailing list, but I think all relevant information is posted above: http://article.gmane.org/gmane.linux.distributions.tails.devel/83

comment:5 Changed 8 years ago by arma

Priority: majornormal

comment:6 in reply to:  4 Changed 8 years ago by anonym

Replying to arma:

Replying to anonym:

  1. I start Vidalia and add a bridge. Tor immediately bootstraps and all connections to the Tor network are made through the bridge (verified with packet sniffer) as expected (except that the bridge connection is exempt from ReachableAddresses, see ticket #2356).

See my explanation on #2356: when you click 'ok' from Vidalia, Vidalia sets your ReachableAddresses as well as your Bridges, to the settings you've configured with Vidalia.

Yup. That's a game changer, so I believe this bug is invalid.

  1. I restart Tor. Tor hangs on "Bootstrapping 85%" according to the log, accompanied by the notices:

Notice: no known bridge descriptors running yet; stalling

and

Notice: Our directory information is no longer up-to-date
enough to build circuits: No live bridge descriptors.

What's Tor's problem with the bridge (I have verified that the bridge works on another system)?

How did you restart Tor? Presumably from inside Vidalia, by clicking 'stop tor' and 'start tor'? Is your Vidalia/Tor configuration such that when you finished step 3, it overwrite Tor's torrc file? If yes, your ReachableAddresses line should be gone. If no, Vidalia remembered the changes it tried to get your Tor to saveconf, and applied them anew the next time you asked it to start Tor.

I always run Tor as a system-wide instance and only let Vidalia control it through the control port. When I start/stop Tor I do it with the init script, and I always (by necessity) do that before I start Vidalia. Vidalia is run by a normal user, and torrc is owned by root, so Vidalia can't change it.

Case closed I think. As I said in #2356, I worked under faulty assumptions on how Vidalia deals with options in torrc. I guess Vidalia is mostly designed for the case when it starts/stops the Tor process and thus has full control/ownership of it and torrc, and that there are some inconsistencies w.r.t. importing settings from torrc when handling a system instance (as in the Tails case).

comment:7 Changed 8 years ago by rransom

Resolution: not a bug
Status: assignedclosed

comment:8 Changed 7 years ago by nickm

Keywords: tor-bridge added

comment:9 Changed 7 years ago by nickm

Component: Tor BridgeTor
Note: See TracTickets for help on using tickets.