1

Gentlemen! I have a serious trouble and I'm writing this because I couldn't find the solution anywhere else on the Internet.

I need to use tor sometimes and it's not forbidden officially yet but it's pretty dangerous in the area where I live. So I wanted to set up a router with OpenWrt and configure the connection the way that certain part of the traffic (which comes from different machines) would be transferred through tor network but (sic!) using the bridges which I provide.

According to what I can understand, in order to set up fully functioning tor connection using bridges, first thing that I had to do was downloading these two packages so I did:

opkg install tor
opkg install obfsproxy

I have to mention that obfsproxy with all its dependencies like python etc. occupies pretty much flash memory, while I've got only 32 MB. So in order to fit everything in, I had to connect a usb flash drive and expand the filesystem using this guide from OpenWrt website. I think that it's important to say because somehow it probably had an impact at what's going to happen next.

Afterwards, I thought that I need to edit torrc which I couldn't find (although I know that it can be absent sometimes) so I created mine in /var/lib/tor where OpenWrt places tor and its configuration by default (that's at least what I was able to find out). So in this file I placed these lines:

UseBridges 1
TransPort 9040
Exitpolicy reject *:*
ExtORPort auto
ClientTransportPlugin obfs4 exec /usr/bin/obfsproxy managed

#I placed my bridges here
bridge obfs4 ---------------- 
bridge obfs4 ----------------
bridge obfs4 ----------------

#I excluded the exit nodes which could be potentially run by the authorities of this area 
ExcludeExitNodes {XX}

After that I started tor using

/etc/init.d/tor start

And it didn't work although after a couple of tries it started.

I couldn't check the connection using

torify curl -s https://check.torproject.org/ | grep -m 1

So I had to look in the log of my router. What I could also observe is that tor was loading using the default config and there was no info about the fact that it was supposed to use bridges. And I don't really want to risk being not a 100% sure that this thing works with bridges.

So I tried to create control port in order to check the circuits and get the info about the bridges, so I added this to torrc

ControlPort 9051
CookieAuthentication 1

And used this python script to check the circuit. But the script didn't work properly and moreover it lead to the system failure, ssh connection to the router interrupted and the only thing that I was able to do was to set the router in the rescue mode and reinstall the OS.

Where did I do wrong? And how am I supposed to set the tor bridges in OpenWrt properly?

UPDATE.1 It seems like I found some kind of a clue. I tried to repeat all the steps and see where the trouble comes up the first time. I've been trying to find the solutions all this time, checked the different config files but there was nothing I could find.

It seems like the first conflict comes up when I install obfsproxy. When I had only tor and obfsproxy installed and the bridges configured in torrc (situated in a place which I finally found using Tomek's advice from the comment) using the text which you can find upper in this post, I tried to run

tor

And one of the first lines of the comeout was:

failed to parce/validate config: 'unknown option usr/lib/python2.7/site-packages/obfsproxy/transport/scramblesuit/__init__.pyc' failing

Any ideas on this?

By the way, I tried to remove the obfsproxy package afterwards and remove its dependencies using

opkg remove --autoremove '*'

And it lead me to the system failure so I had to reinstall OpenWrt again.

  • I would suggest to look at opkg files tor output to see if there is any default torrc file installed. If yes - this is where you should put your configuration. If not - you may need to edit /etc/init.d/tor file to point tor to your config file. Alternative lookint at this file may also give you a clue where to put the torrc file. – Tomek Jan 9 at 13:22
  • @Tomek that was so obvious but I didn't think of it! Thanks, I finally could find this file with the default configuration which was situated in /etc/tor/torrc although that didn't really help me because it seems like the problem was somewhere else. – OldMajorD Jan 10 at 9:45
  • The message in the update seems to come from obfsproxy, so this is likely where you should look now (and I can't help you because I never used it). Does it have any config file to check? Also, are you able to connect to any bridge without obfs? – Tomek Jan 10 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.