How do I set up tor bridges in OpenWrt?












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.










share|improve this question

























  • 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
















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.










share|improve this question

























  • 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














1












1








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.










share|improve this question
















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.







linux openwrt tor






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 10 at 9:45







OldMajorD

















asked Jan 9 at 11:15









OldMajorDOldMajorD

63




63













  • 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



















  • 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

















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





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





@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





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










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1392245%2fhow-do-i-set-up-tor-bridges-in-openwrt%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1392245%2fhow-do-i-set-up-tor-bridges-in-openwrt%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

"Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

Alcedinidae

Origin of the phrase “under your belt”?