-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhidden-service.html
More file actions
123 lines (98 loc) · 5.1 KB
/
hidden-service.html
File metadata and controls
123 lines (98 loc) · 5.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Set up a hidden service</title>
<!-- Bootstrap -->
<link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="blog.css" rel="stylesheet">
</head>
<body>
<header class="navbar navbar-static-top bs-docs-nav">
<div class="container">
<div class="navbar-header">
<a href="index.html" class="navbar-brand">Anonoblog</a>
</div>
<div class="navbar navbar-static-top bs-docs-nav">
<ul class="nav navbar-nav">
<li class="active"> <a href="index.html">Home</a> </li>
<li> <a href="hidden-service.html">Set up a hidden service</a> </li>
<li> <a href="fancy-dot-onion.html">Get a fancy .onion name</a> </li>
<li> <a href="anonymous-server.html">Manage a server anonymously</a></li>
<li> <a href="scan-for-leaks.html">Scan for leaks</a></li>
</ul>
</div>
</div>
</header>
<div class="bs-docs-header">
<div class="container">
<h1>Hello, Tor!</h1>
<div>Creating and running a Tor hidden service anonymously</div>
</div>
</div>
<div class="main-content">
<div class="container">
<h2>Install the Tor command line tool</h2>
<p>
<p>You can install from MacPorts or Homebrew on OS X, from aptitude in Debian/Ubuntu, from <a href="https://www.torproject.org/docs/rpms.html.en">rpms</a> in Fedora/RedHat, or <a href="https://www.torproject.org/download/download.html.en">download directly</a> for Windows (you need the "expert bundle").</p>
<p>These instructions assume you are using Homebrew and OS X, so:</p>
<pre>brew install tor</pre>
<p>Run Tor:</p>
<pre>tor</pre>
<p>Tor is now listening on port 9050. Your computer won't use Tor by default; you have to manually route apps through Tor.</p>
<p>With Tor running, open a new tab and run curl. This should echo HTML from broniesaustralia.com.au.</p>
<pre>curl --socks5-hostname 127.0.0.1:9050 broniesaustralia.com.au</pre>
<h2>Creating a hidden service .onion domain</h2>
<p>
Tor allows you to expose a web service anonymously. First lets set up a very simple webserver in a new terminal tab.
<pre>mkdir simple-service
cd simple-service
echo "Hello, Tor!" > index.html
python -m SimpleHTTPServer 8000</pre>
<p>Test that it is working by opening a new tab and running:</p>
<pre>curl localhost:8000</pre>
</p>
<p>
Edit your torrc:
</p>
<pre>vi /usr/local/etc/tor/torrc</pre>
<p>
and add the following lines:
</p>
<pre>log info file /usr/local/etc/tor/tor.log
# hidden services!
HiddenServiceDir /usr/local/etc/tor/hidden_http_service/
HiddenServicePort 80 127.0.0.1:8000</pre>
<p>This will take the server running on localhost port 8000 and make it available as a Tor hidden service</p>
<p>Restart Tor for the changes to take effect:</p>
<pre>tor</pre>
<p>You can't choose your onion domain name for your hidden service (yet). It is generated by Tor. To find your domain name, read the contents of the hostname file:</p>
<pre>cat /usr/local/etc/tor/hidden_http_service/hostname</pre>
<p>You can test your service using curl through Tor (where <code>xxxxxxxxxxxxxx.onion</code> is the result of the previous command):</p>
<pre>curl --socks5-hostname 127.0.0.1:9050 xxxxxxxxxxxxxx.onion</pre>
Your service is published! You can now access the .onion link from someone else's machine.
<h2>Congratulations! You have a Tor hidden service running.</h2>
<p>
People can anonymously connect to it and get your hello message but won't be able to identify your machine.
</p>
<p>
Now you've got the basics set up, you'll want to get it hosted somewhere reliable.
The next page shows you how to set up and pay for a web server anonymously.
This will provide better reliability for your service and if done correctly will provide a second anonymous shield between you and anyone trying to learn your identity.
</p>
<h2>Next</h2>
<p>
<a href="fancy-dot-onion.html">Get a fancy .onion name</a>
</p>
<br/><hr/><br/>
<p class="center"><a href="https://github.com/anonoBlog/anonoBlog.github.io">Anonoblog</a> | Robin Doherty | <a href="https://robindoherty.com">robindoherty.com</a> | <a href="https://twitter.com/rdoh">@rdoh</a> | <a href="mailto:rdoherty@gmail.com">rdoherty@gmail.com</a> | <a href="https://keybase.io/rdoh">PGP</a> </p>
</div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
</body>
</html>