projects/en/obfsproxy-instructions.wml
5d9213bf
 ## translation metadata
 # Revision: $Revision$
 # Translation-Priority: 4-optional
 
 #include "head.wmi" TITLE="obfsproxy: Installation instructions" CHARSET="UTF-8"
 
 <div id="content" class="clearfix">
   <div id="breadcrumbs">
     <a href="<page index>">Home &raquo; </a>
     <a href="<page projects/projects>">Projects &raquo; </a>
     <a href="<page projects/obfsproxy>">obfsproxy</a>
   </div>
   <div id="maincol">
 
     <!-- PUT CONTENT AFTER THIS TAG -->
 
7f73daf1
     <h1 id="instructions">Obfsproxy Instructions</h1>
5d9213bf
 
8f2f8e39
     <img src="$(IMGROOT)/obfsproxy_diagram.png" alt="client torrc"></a>
 
59ada101
       <p>
         This is a guide for installing the Python version of obfsproxy. If
         you still have the C version, we recommend you to upgrade to the
         Python version!
       </p>
7d4caa99
 
f6f44316
     <h3>Step 0: Install Python</h3>
5d9213bf
     <br>
 
     <p>
f6f44316
       To setup obfsproxy you will need <code>Python</code> (>= 2.7),
       and <code>pip</code>. If you use Debian testing (or unstable),
       or a version of Ubuntu newer than Oneiric, this is easy:
5d9213bf
     <p>
 
f31265a4
     <tt># apt-get install python2.7 python-pip python-dev build-essential</tt>
f6f44316
 
99b6eada
     <p>On Fedora, that command would look like:</p>
 
     <tt># yum install make automake gcc python-pip python-devel libyaml-devel</tt>
1db3b7d3
     <br>
29d80df3
     <br>
f6f44316
     <h3>Step 1: Install Tor</h3>
     <br>
532aa57b
 
5d9213bf
     <p>
59ada101
       You will also need a recent version of Tor (>= 0.2.4.1). We recommend you use
15e8cfbf
       <a href="<page docs/debian>#ubuntu">Tor's repositories for Debian/Ubuntu</a>
59ada101
       or
       <a href="https://gitweb.torproject.org/tor.git">install Tor from git</a>.
5d9213bf
     </p>
 
b3665de8
     <p>
f6f44316
     You need Tor 0.2.4.x because it knows how to automatically report
     your obfsproxy address to BridgeDB.
5d9213bf
     </p>
 
f6f44316
     <h3>Step 2: Install obfsproxy</h3>
5d9213bf
     <br>
 
     <p>
f6f44316
       If you have <code>pip</code>, installing <code>obfsproxy</code>
       and its dependencies should be a matter of a single command:
b3665de8
     </p>
 
f6f44316
     <tt># pip install obfsproxy</tt><br><br>
59ada101
 
b3665de8
     <p>
f6f44316
     You will probably want to run the <em>pip install</em> command as
     root so that obfsproxy gets installed to /usr/local/bin.
5d9213bf
     </p>
51dbc4ab
     <p>
     (Instead of using pip, you could also use <a
     href="https://gitweb.torproject.org/pluggable-transports/obfsproxy.git">the
     git repository</a> of obfsproxy if you feel more adventurous)
     </p>
5d9213bf
 
59ada101
     <h3>Step 3: Setup tor</h3>
5d9213bf
     <br>
 
f6f44316
     <p>
       Now setup Tor.  Edit your /etc/tor/torrc to add:
     </p>
59ada101
 
       <p>
         <tt>SocksPort 0</tt><br>
         <tt>ORPort 443 # or some other port if you already run a webserver/skype</tt><br>
         <tt>BridgeRelay 1</tt><br>
         <tt>Exitpolicy reject *:*</tt><br><br>
 
         <tt>## CHANGEME_1 -> provide a nickname for your bridge, can be anything you like</tt><br>
         <tt>#Nickname CHANGEME_1</tt><br>
         <tt>## CHANGEME_2 -> provide some email address so we can contact you if there's a problem</tt><br>
         <tt>#ContactInfo CHANGEME_2</tt><br><br>
 
5271d888
         <tt>ServerTransportPlugin obfs3 exec /usr/local/bin/obfsproxy managed</tt><br>
59ada101
       </p>
 
       <p>
         Don't forget to uncomment and edit the CHANGEME fields. Also,
         if you didn't install obfsproxy as root, you might have to
         change its path.
       </p>
 
       <h3>Step 4: Launch Tor and verify that it bootstraps</h3>
       <br>
 
       <p>
         Restart Tor to use the new configuration file. (Preface with sudo if
         needed.)
       </p>
 
       <tt># service tor restart</tt><br><br>
 
       <p>
         Now check /var/log/tor/log and you should see something like this:
       </p>
 
       <tt>Nov 05 16:40:45.000 [notice] We now have enough directory information to build circuits.</tt><br>
       <tt>Nov 05 16:40:45.000 [notice] Bootstrapped 80%: Connecting to the Tor network.</tt><br>
       <tt>Nov 05 16:40:46.000 [notice] Bootstrapped 85%: Finishing handshake with first hop.</tt><br>
       <tt>Nov 05 16:40:46.000 [notice] Bootstrapped 90%: Establishing a Tor circuit.</tt><br>
       <tt>Nov 05 16:40:48.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.</tt><br>
       <tt>Nov 05 16:40:48.000 [notice] Bootstrapped 100%: Done.</tt><br><br>
 
       <p>
         If Tor is earlier in the bootstrapping phase, wait until it gets to 100%.
       </p>
 
99b6eada
       <h3>Step 5: Set up port forwarding if needed</h3>
59ada101
       <br>
 
       <p>
         If you're behind a NAT/firewall, you'll need to make your bridge
         reachable from the outside world — both on the ORPort and the
         obfsproxy port. The ORPort is whatever you defined in step two
         above. To find your obfsproxy port, check your Tor logs for two
         lines similar to these:
       </p>
 
       <tt>Oct 05 20:00:42.000 [notice] Registered server transport 'obfs3' at '0.0.0.0:40172</tt><br><br>
 
       <p>
         The last number in each line, in this case 26821 and 40172, are the
         TCP port numbers that you need to forward through your
         firewall. (This port is randomly chosen the first time Tor starts,
         but Tor will cache and reuse the same number in future runs.) If you
         want to change the number, use Tor 0.2.4.7-alpha or later, and set
fb3327eb
         "ServerTransportListenAddr obfs3 0.0.0.0:26821" in your torrc.
59ada101
       </p>
5d9213bf
 
     <br>
 
   </div>
   <!-- END MAINCOL -->
   <div id = "sidecol">
 #include "side.wmi"
 #include "info.wmi"
   </div>
   <!-- END SIDECOL -->
 </div>
 <!-- END CONTENT -->
 #include <foot.wmi>