-
Notifications
You must be signed in to change notification settings - Fork 8
/
fbsd-relays.html.bak
138 lines (95 loc) · 5.18 KB
/
fbsd-relays.html.bak
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>FreeBSD Guide to Configuring Tor Relays</title>
<link type="text/css" rel="stylesheet" href="torbsd.css"/>
<meta name="author" content="gman999"/>
<meta name="editors" content="attila"/>
<meta name="date" content="20150505"/>
<meta name="note" content="These lines at the top are multimarkdown metadata; leave them."/>
<meta name="sep" content="&#8916;"/>
</head>
<body>
<h1 id="thetorbsddiversityprojecttdp"><a href="index.html">The Tor BSD Diversity Project (TDP)</a></h1>
<p>&#8916; <a href="blog.html">Blog</a> &#8916; <a href="faq.html">FAQ</a> &#8916; <a href="resources.html">Resources</a> &#8916; <a href="https://github.com/torbsd/">GitHub</a> &#8916; <a href="contact.html">Contact</a> &#8916; <a href="http://bptfp7py2wclht26.onion/">TDP Onion</a> &#8916;</p>
<p><strong><a href="projects.html">The TDP Projects</a>:</strong><br/>
&#8916; <a href="https://github.com/torbsd/openbsd-ports/">Tor Browser for OpenBSD</a> &#8916; <a href="relay-guides.html">BSD Relay Guides</a> &#8916; <a href="corp-relays.html">Corporate Relays</a> &#8916; <a href="porting-pets.html">Ports for PETs</a> &#8916; <a href="oostats.html">Statistics</a> &#8916;</p>
<h2 id="freebsdguidetoconfiguringtorrelays">FreeBSD Guide to Configuring Tor Relays</h2>
<p><strong>THIS IS PRELIMINARY WORK AT AN EARLY STAGE. ANONYMITY IS NOT A GAME, SO PLEASE DO NOT JUST ASSUME THESE GUIDES ARE FINE AS-IS. YOU HAVE BEEN WARNED.</strong></p>
<h2 id="introduction">Introduction</h2>
<p><a href="https://www.freebsd.org">FreeBSD</a> is a Unix-derived operating system
focused on reliability and performance. FreeBSD maintains a large user
base in the backend infrastructures of the world, not to mention in
products and services such as WhatsApp, Juniper, Netflix, NetApp and
Isilon. Widely used systems such as pfSense and FreeNAS are also based
on FreeBSD.</p>
<p>FreeBSD is an ideal platform for running a Tor relay. This guide
aims to provide insights for those interested in running a Tor relay
on FreeBSD. It assumes a certain level of basic comfort with
traditional Unix tools such as editors and starting and stopping
daemons, not to mention navigating through the install process and
general setup. This is not a full step-by-step instructional for
those who are new to the Unix shell.</p>
<p>For installing applications, the FreeBSD ports system is the preferred
method, as it maintains the most current versions, as opposed to the
new pkg system.</p>
<p>There are version FreeBSD branches in regular development. It is
recommended to use the most recent production release, which is the
10-branch.</p>
<p>This guide is based on the FreeBSD 10-branch.</p>
<h3 id="syntax">Syntax</h3>
<p>Refer to the <a href="doc-guide.html">Documentation Style Guide</a> for
information about syntax in this document.</p>
<h3 id="freebsddocumentation">FreeBSD Documentation</h3>
<p>FreeBSD maintains documentation in the [FreeBSD Handbook] and in the
[manual pages]. The man pages are also available directly on a FreeBSD
system.</p>
<h2 id="thequickandshortversion">The Quick and Short Version</h2>
<p>These are the basic steps to configure a Tor relay with FreeBSD. This
will create an operational relay.</p>
<p>Install FreeBSD 10 and update to most recent -STABLE version</p>
<p>Populate and/or update the ports tree under <em>/usr/ports</em></p>
<blockquote>
<p>% svnlite update /usr/ports</p>
</blockquote>
<p>Install either the stable or development version of Tor from the ports tree. The -devel or alpha version of Tor is likely the better choice.</p>
<blockquote>
<p>% cd /usr/ports/security/tor && make install clean</p>
</blockquote>
<p>or</p>
<blockquote>
<p>% cd /usr/ports/security/tor-devel && make install clean</p>
</blockquote>
<p>Copy the torrc.sample file to torrc</p>
<blockquote>
<p>% cp /usr/local/etc/tor/torrc.sample /usr/local/etc/tor/torrc</p>
</blockquote>
<p>Edit <em>/usr/local/etc/tor/torrc</em> appropriately. The torrc file is well-commented and instructive, but for a quicker implementation, <a href="torrc.txt">this torrc</a> is a good starting point.</p>
<p>Create the appropriate log file with the correct permissions:</p>
<blockquote>
<p>% touch /var/log/tor && chown _tor:_tor /var/log/tor && chmod 600 /var/log/tor</p>
</blockquote>
<p>Add “tor_enable=YES” in the /etc/rc.conf file</p>
<blockquote>
<p>% echo “tor_enable=YES” >>/etc/rc.conf</p>
</blockquote>
<p>Enable random IP ID numbers, and make it permanent by adding to /etc/sysctl.conf as per the post-install message:</p>
<blockquote>
<p>% sysctl net.inet.ip.random_id=1</p>
<p>% echo “net.inet.ip.random_id=1” >>/etc/sysctl.conf</p>
</blockquote>
<p>Start Tor </p>
<blockquote>
<p>% /usr/local/etc/rc.d/tor start</p>
</blockquote>
<p>Use tail(4) to confirm Tor starts correctly:</p>
<blockquote>
<p>% tail -f /var/log/tor.log</p>
</blockquote>
<p>Reboot to confirm that Tor starts after a reboot.</p>
<p><hr></p>
<p><em>Copyright © 2018 by The Tor BSD Diversity Project (TDP). All Rights Reserved.</em></p>
<p><code>last updated: Tue Jun 13 19:25:38 2017 UTC</code></p>
</body>
</html>