How to get an obfsproxy-enabled tor bridge running on a torc

Φίλοι και μέλη γνωριζόμαστε και συζητάμε για τα θέματα που μας απασχολούν.
Nicos
Μέλος του Κόμματος Πειρατών
Δημοσιεύσεις: 15
Εγγραφή: 11 Φεβ 2012, 23:04
Επικοινωνία:

How to get an obfsproxy-enabled tor bridge running on a torc

Δημοσίευσηαπό Nicos » 15 Φεβ 2012, 11:12

Version 0.2 by .koolfy
_________________________________




1- build and install obfsproxy
------------------------------

> get necessary tools to compile source code
$ sudo apt-get install autoconf autotools-dev gcc pkg-config libtool git-core devscripts

>fetch the .deb files that are not included it ubuntu's repos
$ dget http://gaffer.ptitcanardnoir.org/intrig ... 86.changes

> install those in the right order
$ sudo dpkg -i libevent-2.0-5_2.0.16-stable-1~bpo60+1_i386.deb
$ sudo dpkg -i libevent-core-2.0-5_2.0.16-stable-1~bpo60+1_i386.deb
$ sudo dpkg -i libevent-extra-2.0-5_2.0.16-stable-1~bpo60+1_i386.deb
$ sudo dpkg -i libevent-pthreads-2.0-5_2.0.16-stable-1~bpo60+1_i386.deb

> we also need newer libssl packages
$ wget http://mirror.pnl.gov/ubuntu//pool/main ... 2_i386.deb
$ wget http://mirror.pnl.gov/ubuntu//pool/main ... 2_i386.deb
$ sudo dpkg -i libssl0.9.8_0.9.8o-5ubuntu1.2_i386.deb
$ sudo apt-get install zlib1g-dev
$ sudo dpkg -i libssl-dev_0.9.8o-5ubuntu1.2_i386.deb
$ sudo dpkg -i libssl0.9.8_0.9.8o-7ubuntu1_i386.deb
$ sudo dpkg -i libevent-openssl-2.0-5_2.0.16-stable-1~bpo60+1_i386.deb
$ sudo dpkg -i libevent-dbg_2.0.16-stable-1~bpo60+1_i386.deb
$ sudo dpkg -i libevent-dev_2.0.16-stable-1~bpo60+1_i386.deb

> get obfsproxy's source code
$ git clone https://git.torproject.org/obfsproxy.git
$ cd obfsproxy/
$ ./autogen.sh && ./configure && make
$ sudo make install
$ cd

> obfsproxy is now built and installed in the system



2- modify torrc
---------------

$ sudo vim /etc/tor/torrc

> add this line at the end of the file :

ServerTransportPlugin obfs2 exec /usr/local/bin/obfsproxy --managed

> save and close the file.




-2b Until https://trac.torproject.org/projects/tor/ticket/5104 is fixed (mainly affects torcloud images)
-----------------------------------------------------------------------

> we need to do a workaround directly in tor's source code, so we get it
$ git clone git://git.torproject.org/tor.git
$ cd tor
$ vim src/or/transports.c

> find the "router_get_advertised_or_port(options)" expression (it should be located at line 1122) and replace it with "9001"
> if your ORListenAddress is set to 0.0.0.0:SOMETHING in your /etc/tor/torrc, replace "9001" with "SOMETHING"

> and now we build our modified tor
$ sh autogen.sh
$ ./configure --disable-asciidoc
$ make

> be sure to remove every old tor component from the system before we install our modified one in its place
$ cat /usr/share/tor/tor-service-defaults-torrc

> put everything this command outputs at the end of your /etc/tor/torrc file.
(It would be wise to write a comment like "#this is from /usr/share/tor/tor-service-defaults-torrc" before those lines to know where they are from, and remember to remove them when you use the apt-get provided tor package again.)

$ sudo apt-get remove tor

$ sudo make install



-3 launch tor with obfsproxy
-------------------------


> IF https://trac.torproject.org/projects/tor/ticket/5104 IS NOT FIXED AND YOU HAD TO RECOMPILE TOR
$ sudo tor -f /etc/tor/torrc


> if you didn't mess with Tor and still use the one provided by apt-get, simply use
$ sudo /etc/init.d/tor restart


> see /var/log/tor/log or arm's output and look for both lines :

18:44:55 [WARN] Registered server transport 'obfs2' at '0.0.0.0:<PORT>'
18:44:55 [NOTICE] Guessed our IP address as <IP> (source: <SOMETHING>).

Your bridge should be reachable at <IP>:<PORT>


-4 configure amazon's firewall to forward the right port
--------------------------------------------------------

> go to your EC2 dashboard via the amazon web interface
https://console.aws.amazon.com/ec2/logi ... e#s=SignUp

> on the left menu, click on "Security Groups"
> click on "tor-cloud-servers"

> on the frame at the bottom of the screen, click on the tab called "Inbound"
> under "Custom TPC rule" on the "port range" line, write the port number of your obfsproxy instance (<PORT> on the section -3)
> click on the "Add Rule" button
> click on the "Apply rule change" button.

Do this every time your obfsproxy port changes.


-4 test if your bridge is reachable through obfsproxy
-----------------------------------------------------

> get obfsproxy's Tor Browser Bundle here
https://www.torproject.org/projects/obfsproxy

> extract the content, and remove every
bridge obfs2 <IP>:<PORT>

> entry already present on your data/tor/torrc file

> write one and only one line with the <IP>:<PORT> of YOUR obfsproxy bridge (see section 3-)
bridge obfs2 <IP>:<PORT>


> launch the bundle, vidalia should stard and try to connect to the tor network through your obfsproxy bridge. If it succeeds and the browser launches and works as it should, your obfsproxy bridge works. If vidalia's connection to the tor network stalls, something is wrong.




IMPORTANT NOTES
_______________


This is not a definitive howto.
This is an explanation on how to set up an obfsproxy bridge on torcloud images RIGHT NOW, immediately.
As the time of writing this, there is no stable obfsproxy package in ubuntu's repos, and bug #5104 is not fixed.
This means that you have to build obfsproxy manually, and maybe even tor (to workaround bug #5104). Thus neither obfsproxy nor tor softwares will be able to upgrade themselves via apt-get.

If you go down that road, be sure to do so manually and regularly, as it's very important that you bridge runs the lastest version of both obfsproxy and tor software.


If when you read this obfsproxy is available through apt-get on torcloud images and bug #5104 is fixed in tor, please avoind building anything manually and use apt-get install instead.



If you have any question, or problem, come to irc.oftc.net/6667 channel #tor and ask for help.
WikiLeaks: +400 days of banking blockade - no process
Assange: +400 days detainment - no charge
Manning: +600 days in jail - no trial

jackjacki
Δημοσιεύσεις: 1
Εγγραφή: 11 Ιουν 2013, 10:28

Re: How to get an obfsproxy-enabled tor bridge running on a

Δημοσίευσηαπό jackjacki » 11 Ιουν 2013, 10:37

If vidalia's connection to the tor network stalls, something is wrong................., :P :P :P
$$ jackjacki $$

baskin
Μέλος του Κόμματος Πειρατών
Δημοσιεύσεις: 8666
Εγγραφή: 23 Δεκ 2011, 23:28
Τοποθεσία: Σύρος, Κυκλάδες

Re: How to get an obfsproxy-enabled tor bridge running on a

Δημοσίευσηαπό baskin » 11 Ιουν 2013, 23:23

our server is running this for some time...
Στον τάφο της Αμφίπολης είναι ο Μαυρογένης...


Επιστροφή στο

Μέλη σε σύνδεση

Μέλη σε αυτή την Δ. Συζήτηση: 6 και 0 επισκέπτες