59ada101a4ff4f3de0e8126d80501af1b0e70d64
Roger Dingledine add asn's first draft of ob...

Roger Dingledine authored 12 years ago

1) ## translation metadata
2) # Revision: $Revision$
3) # Translation-Priority: 4-optional
4) 
5) #include "head.wmi" TITLE="obfsproxy: Installation instructions" CHARSET="UTF-8"
6) 
7) <div id="content" class="clearfix">
8)   <div id="breadcrumbs">
9)     <a href="<page index>">Home &raquo; </a>
10)     <a href="<page projects/projects>">Projects &raquo; </a>
11)     <a href="<page projects/obfsproxy>">obfsproxy</a>
12)   </div>
13)   <div id="maincol">
14) 
15)     <!-- PUT CONTENT AFTER THIS TAG -->
16) 
Roger Dingledine start to streamline the obf...

Roger Dingledine authored 12 years ago

17)     <h1 id="instructions">Obfsproxy Instructions</h1>
Roger Dingledine add asn's first draft of ob...

Roger Dingledine authored 12 years ago

18) 
Roger Dingledine put the diagram at the top;...

Roger Dingledine authored 12 years ago

19)     <img src="$(IMGROOT)/obfsproxy_diagram.png" alt="client torrc"></a>
20) 
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

21)       <p>
22)         This is a guide for installing the Python version of obfsproxy. If
23)         you still have the C version, we recommend you to upgrade to the
24)         Python version!
25)       </p>
George Kadianakis Add instructions for settin...

George Kadianakis authored 11 years ago

26) 
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

27)     <h3>Step 0: Install dependencies</h3>
Roger Dingledine add asn's first draft of ob...

Roger Dingledine authored 12 years ago

28)     <br>
29) 
30)     <p>
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

31)       To setup obfsproxy you will need <code>git</code>, <code>Python</code>
32)       (>= 2.7), <code>Twisted</code> and some common Python modules
33)       (<code>setuptools</code>, <code>argparse</code> and <code>PyCrypto</code>)
34)       . If you use Debian testing (or unstable), or a version of
35)       Ubuntu newer than Oneiric, this is easy:
Roger Dingledine add asn's first draft of ob...

Roger Dingledine authored 12 years ago

36)     <p>
37) 
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

38)     <tt># apt-get install git python2.7 python-setuptools python-crypto python-twisted python-argparse</tt>
Roger Dingledine explain further dependencies

Roger Dingledine authored 12 years ago

39) 
Roger Dingledine add asn's first draft of ob...

Roger Dingledine authored 12 years ago

40)     <p>
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

41)       You will also need a recent version of Tor (>= 0.2.4.1). We recommend you use
42)       <a href="<page docs/debian>#development">Tor's experimental repositories for Debian/Ubuntu</a>
43)       or
44)       <a href="https://gitweb.torproject.org/tor.git">install Tor from git</a>.
Roger Dingledine add asn's first draft of ob...

Roger Dingledine authored 12 years ago

45)     </p>
46) 
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

47)     <h3>Step 1: Install pyptlib</h3>
Roger Dingledine add asn's first draft of ob...

Roger Dingledine authored 12 years ago

48)     <br>
49) 
50)     <p>
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

51)       You will also need pyptlib, a small library developed by the Tor
52)       Project for writing pluggable transports.
Sebastian Hahn Update obfsproxy instructio...

Sebastian Hahn authored 12 years ago

53)     </p>
54) 
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

55)     <tt>$ git clone https://git.torproject.org/pluggable-transports/pyptlib.git</tt><br>
56)     <tt>$ cd pyptlib && python setup.py install</tt><br><br>
Sebastian Hahn obfsproxy instructions upda...

Sebastian Hahn authored 12 years ago

57) 
58)     <p>
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

59)       You might need to run the <em>python setup.py install</em>
60)       command as root. If you don't want to run it as root, you can
61)       use <em>python setup.py install --user</em> which will install pyptlib
62)       just for the current user.
Roger Dingledine add asn's first draft of ob...

Roger Dingledine authored 12 years ago

63)     </p>
64) 
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

65)     <h3>Step 2: Install and test obfsproxy</h3>
Roger Dingledine add asn's first draft of ob...

Roger Dingledine authored 12 years ago

66)     <br>
67) 
68)     <p>
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

69)       Now it's time to fetch obfsproxy and test that it works:
Sebastian Hahn obfsproxy instructions upda...

Sebastian Hahn authored 12 years ago

70)     </p>
71) 
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

72)     <tt>$ git clone https://git.torproject.org/pluggable-transports/obfsproxy.git</tt><br>
73)     <tt>$ cd obfsproxy</tt><br>
74)     <tt>$ python obfsproxy/test/tester.py</tt><br><br>
75) 
Sebastian Hahn obfsproxy instructions upda...

Sebastian Hahn authored 12 years ago

76)     <p>
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

77)       If you got a message reporting that all tests finished successfully,
78)       then obfsproxy works for you. Time to run the setup.py script so that
79)       obfsproxy gets installed in your system:
Roger Dingledine add asn's first draft of ob...

Roger Dingledine authored 12 years ago

80)     </p>
81) 
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

82)     <tt># python setup.py install</tt><br><br>
Roger Dingledine add asn's first draft of ob...

Roger Dingledine authored 12 years ago

83) 
84)     <p>
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

85)     You will probably want to run the setup.py script as root so that obfsproxy gets installed in /usr/local/bin.
Roger Dingledine add asn's first draft of ob...

Roger Dingledine authored 12 years ago

86)     </p>
87) 
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

88)     <h3>Step 3: Setup tor</h3>
Roger Dingledine add asn's first draft of ob...

Roger Dingledine authored 12 years ago

89)     <br>
90) 
George Kadianakis Switch obfsproxy setup inst...

George Kadianakis authored 11 years ago

91)       <p>
92)         Edit your /etc/tor/torrc to add:
93)       </p>
94) 
95)       <p>
96)         <tt>SocksPort 0</tt><br>
97)         <tt>ORPort 443 # or some other port if you already run a webserver/skype</tt><br>
98)         <tt>BridgeRelay 1</tt><br>
99)         <tt>Exitpolicy reject *:*</tt><br><br>
100) 
101)         <tt>## CHANGEME_1 -> provide a nickname for your bridge, can be anything you like</tt><br>
102)         <tt>#Nickname CHANGEME_1</tt><br>
103)         <tt>## CHANGEME_2 -> provide some email address so we can contact you if there's a problem</tt><br>
104)         <tt>#ContactInfo CHANGEME_2</tt><br><br>
105) 
106)         <tt>ServerTransportPlugin obfs2,obfs3 exec /usr/local/bin/obfsproxy managed</tt><br>
107)       </p>
108) 
109)       <p>
110)         Don't forget to uncomment and edit the CHANGEME fields. Also,
111)         if you didn't install obfsproxy as root, you might have to
112)         change its path.
113)       </p>
114) 
115)       <h3>Step 4: Launch Tor and verify that it bootstraps</h3>
116)       <br>
117) 
118)       <p>
119)         Restart Tor to use the new configuration file. (Preface with sudo if
120)         needed.)
121)       </p>
122) 
123)       <tt># service tor restart</tt><br><br>
124) 
125)       <p>
126)         Now check /var/log/tor/log and you should see something like this:
127)       </p>
128) 
129)       <tt>Nov 05 16:40:45.000 [notice] We now have enough directory information to build circuits.</tt><br>
130)       <tt>Nov 05 16:40:45.000 [notice] Bootstrapped 80%: Connecting to the Tor network.</tt><br>
131)       <tt>Nov 05 16:40:46.000 [notice] Bootstrapped 85%: Finishing handshake with first hop.</tt><br>
132)       <tt>Nov 05 16:40:46.000 [notice] Bootstrapped 90%: Establishing a Tor circuit.</tt><br>
133)       <tt>Nov 05 16:40:48.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.</tt><br>
134)       <tt>Nov 05 16:40:48.000 [notice] Bootstrapped 100%: Done.</tt><br><br>
135) 
136)       <p>
137)         If Tor is earlier in the bootstrapping phase, wait until it gets to 100%.
138)       </p>
139) 
140)       <h2>Step 5: Set up port forwarding if needed</h2>
141)       <br>
142) 
143)       <p>
144)         If you're behind a NAT/firewall, you'll need to make your bridge
145)         reachable from the outside world — both on the ORPort and the
146)         obfsproxy port. The ORPort is whatever you defined in step two
147)         above. To find your obfsproxy port, check your Tor logs for two
148)         lines similar to these:
149)       </p>
150) 
151)       <tt>Oct 05 20:00:41.000 [notice] Registered server transport 'obfs2' at '0.0.0.0:26821</tt><br>
152)       <tt>Oct 05 20:00:42.000 [notice] Registered server transport 'obfs3' at '0.0.0.0:40172</tt><br><br>
153) 
154)       <p>
155)         The last number in each line, in this case 26821 and 40172, are the
156)         TCP port numbers that you need to forward through your
157)         firewall. (This port is randomly chosen the first time Tor starts,
158)         but Tor will cache and reuse the same number in future runs.) If you
159)         want to change the number, use Tor 0.2.4.7-alpha or later, and set
160)         "ServerTransportListenAddr obfs2 0.0.0.0:26821" in your torrc.
161)       </p>