|
@@ -0,0 +1,447 @@
|
|
1
|
+<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
3
|
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
4
|
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
|
5
|
+<head>
|
|
6
|
+<title></title>
|
|
7
|
+<!-- 2014-10-26 Sun 20:48 -->
|
|
8
|
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
|
9
|
+<meta name="generator" content="Org-mode" />
|
|
10
|
+<meta name="author" content="Bob Mottram" />
|
|
11
|
+<meta name="description" content="Turn the Beaglebone Black into a personal communications server"
|
|
12
|
+ />
|
|
13
|
+<meta name="keywords" content="freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber" />
|
|
14
|
+<style type="text/css">
|
|
15
|
+ <!--/*--><![CDATA[/*><!--*/
|
|
16
|
+ .title { text-align: center; }
|
|
17
|
+ .todo { font-family: monospace; color: red; }
|
|
18
|
+ .done { color: green; }
|
|
19
|
+ .tag { background-color: #eee; font-family: monospace;
|
|
20
|
+ padding: 2px; font-size: 80%; font-weight: normal; }
|
|
21
|
+ .timestamp { color: #bebebe; }
|
|
22
|
+ .timestamp-kwd { color: #5f9ea0; }
|
|
23
|
+ .right { margin-left: auto; margin-right: 0px; text-align: right; }
|
|
24
|
+ .left { margin-left: 0px; margin-right: auto; text-align: left; }
|
|
25
|
+ .center { margin-left: auto; margin-right: auto; text-align: center; }
|
|
26
|
+ .underline { text-decoration: underline; }
|
|
27
|
+ #postamble p, #preamble p { font-size: 90%; margin: .2em; }
|
|
28
|
+ p.verse { margin-left: 3%; }
|
|
29
|
+ pre {
|
|
30
|
+ border: 1px solid #ccc;
|
|
31
|
+ box-shadow: 3px 3px 3px #eee;
|
|
32
|
+ padding: 8pt;
|
|
33
|
+ font-family: monospace;
|
|
34
|
+ overflow: auto;
|
|
35
|
+ margin: 1.2em;
|
|
36
|
+ }
|
|
37
|
+ pre.src {
|
|
38
|
+ position: relative;
|
|
39
|
+ overflow: visible;
|
|
40
|
+ padding-top: 1.2em;
|
|
41
|
+ }
|
|
42
|
+ pre.src:before {
|
|
43
|
+ display: none;
|
|
44
|
+ position: absolute;
|
|
45
|
+ background-color: white;
|
|
46
|
+ top: -10px;
|
|
47
|
+ right: 10px;
|
|
48
|
+ padding: 3px;
|
|
49
|
+ border: 1px solid black;
|
|
50
|
+ }
|
|
51
|
+ pre.src:hover:before { display: inline;}
|
|
52
|
+ pre.src-sh:before { content: 'sh'; }
|
|
53
|
+ pre.src-bash:before { content: 'sh'; }
|
|
54
|
+ pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
|
|
55
|
+ pre.src-R:before { content: 'R'; }
|
|
56
|
+ pre.src-perl:before { content: 'Perl'; }
|
|
57
|
+ pre.src-java:before { content: 'Java'; }
|
|
58
|
+ pre.src-sql:before { content: 'SQL'; }
|
|
59
|
+
|
|
60
|
+ table { border-collapse:collapse; }
|
|
61
|
+ caption.t-above { caption-side: top; }
|
|
62
|
+ caption.t-bottom { caption-side: bottom; }
|
|
63
|
+ td, th { vertical-align:top; }
|
|
64
|
+ th.right { text-align: center; }
|
|
65
|
+ th.left { text-align: center; }
|
|
66
|
+ th.center { text-align: center; }
|
|
67
|
+ td.right { text-align: right; }
|
|
68
|
+ td.left { text-align: left; }
|
|
69
|
+ td.center { text-align: center; }
|
|
70
|
+ dt { font-weight: bold; }
|
|
71
|
+ .footpara:nth-child(2) { display: inline; }
|
|
72
|
+ .footpara { display: block; }
|
|
73
|
+ .footdef { margin-bottom: 1em; }
|
|
74
|
+ .figure { padding: 1em; }
|
|
75
|
+ .figure p { text-align: center; }
|
|
76
|
+ .inlinetask {
|
|
77
|
+ padding: 10px;
|
|
78
|
+ border: 2px solid gray;
|
|
79
|
+ margin: 10px;
|
|
80
|
+ background: #ffffcc;
|
|
81
|
+ }
|
|
82
|
+ #org-div-home-and-up
|
|
83
|
+ { text-align: right; font-size: 70%; white-space: nowrap; }
|
|
84
|
+ textarea { overflow-x: auto; }
|
|
85
|
+ .linenr { font-size: smaller }
|
|
86
|
+ .code-highlighted { background-color: #ffff00; }
|
|
87
|
+ .org-info-js_info-navigation { border-style: none; }
|
|
88
|
+ #org-info-js_console-label
|
|
89
|
+ { font-size: 10px; font-weight: bold; white-space: nowrap; }
|
|
90
|
+ .org-info-js_search-highlight
|
|
91
|
+ { background-color: #ffff00; color: #000000; font-weight: bold; }
|
|
92
|
+ /*]]>*/-->
|
|
93
|
+</style>
|
|
94
|
+<link rel="stylesheet" type="text/css"
|
|
95
|
+href="http://sachachua.com/blog/wp-content/themes/sacha-v3/foundation/css/foundation.min.css"></link>
|
|
96
|
+<link rel="stylesheet" type="text/css" href="http://sachachua.com/org-export.css"></link>
|
|
97
|
+<link rel="stylesheet" type="text/css" href="http://sachachua.com/blog/wp-content/themes/sacha-v3/style.css"></link>
|
|
98
|
+<script type="text/javascript">
|
|
99
|
+/*
|
|
100
|
+@licstart The following is the entire license notice for the
|
|
101
|
+JavaScript code in this tag.
|
|
102
|
+
|
|
103
|
+Copyright (C) 2012-2013 Free Software Foundation, Inc.
|
|
104
|
+
|
|
105
|
+The JavaScript code in this tag is free software: you can
|
|
106
|
+redistribute it and/or modify it under the terms of the GNU
|
|
107
|
+General Public License (GNU GPL) as published by the Free Software
|
|
108
|
+Foundation, either version 3 of the License, or (at your option)
|
|
109
|
+any later version. The code is distributed WITHOUT ANY WARRANTY;
|
|
110
|
+without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
111
|
+FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
|
112
|
+
|
|
113
|
+As additional permission under GNU GPL version 3 section 7, you
|
|
114
|
+may distribute non-source (e.g., minimized or compacted) forms of
|
|
115
|
+that code without the copy of the GNU GPL normally required by
|
|
116
|
+section 4, provided you include this license notice and a URL
|
|
117
|
+through which recipients can access the Corresponding Source.
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+@licend The above is the entire license notice
|
|
121
|
+for the JavaScript code in this tag.
|
|
122
|
+*/
|
|
123
|
+<!--/*--><![CDATA[/*><!--*/
|
|
124
|
+ function CodeHighlightOn(elem, id)
|
|
125
|
+ {
|
|
126
|
+ var target = document.getElementById(id);
|
|
127
|
+ if(null != target) {
|
|
128
|
+ elem.cacheClassElem = elem.className;
|
|
129
|
+ elem.cacheClassTarget = target.className;
|
|
130
|
+ target.className = "code-highlighted";
|
|
131
|
+ elem.className = "code-highlighted";
|
|
132
|
+ }
|
|
133
|
+ }
|
|
134
|
+ function CodeHighlightOff(elem, id)
|
|
135
|
+ {
|
|
136
|
+ var target = document.getElementById(id);
|
|
137
|
+ if(elem.cacheClassElem)
|
|
138
|
+ elem.className = elem.cacheClassElem;
|
|
139
|
+ if(elem.cacheClassTarget)
|
|
140
|
+ target.className = elem.cacheClassTarget;
|
|
141
|
+ }
|
|
142
|
+/*]]>*///-->
|
|
143
|
+</script>
|
|
144
|
+</head>
|
|
145
|
+<body>
|
|
146
|
+<div id="preamble" class="status">
|
|
147
|
+<a name="top" id="top"></a>
|
|
148
|
+</div>
|
|
149
|
+<div id="content">
|
|
150
|
+<h1 class="title"></h1>
|
|
151
|
+<div class="center">
|
|
152
|
+
|
|
153
|
+<div class="figure">
|
|
154
|
+<p><img src="./images/logo.png" alt="logo.png" />
|
|
155
|
+</p>
|
|
156
|
+</div>
|
|
157
|
+</div>
|
|
158
|
+<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+<colgroup>
|
|
162
|
+<col class="left" />
|
|
163
|
+
|
|
164
|
+<col class="left" />
|
|
165
|
+
|
|
166
|
+<col class="left" />
|
|
167
|
+
|
|
168
|
+<col class="left" />
|
|
169
|
+</colgroup>
|
|
170
|
+<tbody>
|
|
171
|
+<tr>
|
|
172
|
+<td class="left"><a href="index.html">Home</a></td>
|
|
173
|
+<td class="left"><a href="#unnumbered-1">On a Beaglebone Black</a></td>
|
|
174
|
+<td class="left"><a href="#unnumbered-2">On other hardware</a></td>
|
|
175
|
+<td class="left"><a href="#unnumbered-3">Internet Router</a></td>
|
|
176
|
+</tr>
|
|
177
|
+</tbody>
|
|
178
|
+</table>
|
|
179
|
+
|
|
180
|
+<div id="outline-container-unnumbered-1" class="outline-2">
|
|
181
|
+<h2 id="unnumbered-1">On a Beaglebone Black</h2>
|
|
182
|
+<div class="outline-text-2" id="text-unnumbered-1">
|
|
183
|
+<p>
|
|
184
|
+To get started you will need:
|
|
185
|
+</p>
|
|
186
|
+
|
|
187
|
+<ul class="org-ul">
|
|
188
|
+<li>A Beaglebone Black
|
|
189
|
+</li>
|
|
190
|
+<li>A MicroSD card
|
|
191
|
+</li>
|
|
192
|
+<li>Ethernet cable
|
|
193
|
+</li>
|
|
194
|
+<li>Optionally a 5V 2A power supply for the Beaglebone Black
|
|
195
|
+</li>
|
|
196
|
+<li>Access to the internet via a router with ethernet sockets
|
|
197
|
+</li>
|
|
198
|
+<li>USB thumb drive (for backups or storing media)
|
|
199
|
+</li>
|
|
200
|
+<li>One or more subdomains created on <a href="https://freedns.afraid.org/">https://freedns.afraid.org/</a>
|
|
201
|
+</li>
|
|
202
|
+<li>A purchased domain name and SSL certificate (only needed for Red Matrix)
|
|
203
|
+</li>
|
|
204
|
+<li>A laptop or desktop machine with the ability to write to a microSD card (might need an adaptor)
|
|
205
|
+</li>
|
|
206
|
+</ul>
|
|
207
|
+
|
|
208
|
+<p>
|
|
209
|
+You will also need to know, or find out, the IP address of your internet router and have a suitable static IP address for the Beaglebone on your local network. The router should allow you to forward ports to the Beaglebone (often this is under firewall or "advanced" settings).
|
|
210
|
+</p>
|
|
211
|
+
|
|
212
|
+<p>
|
|
213
|
+Check that within <b>initial_setup.sh</b> the router IP address and static IP for the Beaglebone are set correctly.
|
|
214
|
+</p>
|
|
215
|
+
|
|
216
|
+<p>
|
|
217
|
+Plug the microSD card into your laptop/desktop and then run the <b>initial_setup.sh</b> script. For example:
|
|
218
|
+</p>
|
|
219
|
+
|
|
220
|
+<div class="org-src-container">
|
|
221
|
+
|
|
222
|
+<pre class="src src-bash">./initial_setup.sh /dev/sdX
|
|
223
|
+</pre>
|
|
224
|
+</div>
|
|
225
|
+
|
|
226
|
+<p>
|
|
227
|
+where <b>/dev/sdX</b> is the device name for the microSD card. Often it's <b>/dev/sdb</b> or <b>/dev/sdc</b>, depending upon how many drives there are on your system. The script will download the Debian installer and update the microSD card. It can take a while, so be patient.
|
|
228
|
+</p>
|
|
229
|
+
|
|
230
|
+<p>
|
|
231
|
+When the initial setup is done follow the instructions on screen to run the main Freedombone script. You can either edit the variables within the <b>install-freedombone.sh</b> script directly, or create a separate configuration file called <b>freedombone.cfg</b> which contains those variables. Variables which you might want to put into a <b>freedombone.cfg</b> file are:
|
|
232
|
+</p>
|
|
233
|
+
|
|
234
|
+<div class="org-src-container">
|
|
235
|
+
|
|
236
|
+<pre class="src src-bash"><span class="org-variable-name">MY_EMAIL_ADDRESS</span>=
|
|
237
|
+<span class="org-variable-name">MY_NAME</span>=
|
|
238
|
+<span class="org-variable-name">MY_BLOG_TITLE</span>=
|
|
239
|
+<span class="org-variable-name">MY_BLOG_SUBTITLE</span>=
|
|
240
|
+<span class="org-variable-name">SSH_PORT</span>=
|
|
241
|
+<span class="org-variable-name">FULLBLOG_DOMAIN_NAME</span>=
|
|
242
|
+<span class="org-variable-name">FULLBLOG_FREEDNS_SUBDOMAIN_CODE</span>=
|
|
243
|
+<span class="org-variable-name">MICROBLOG_DOMAIN_NAME</span>=
|
|
244
|
+<span class="org-variable-name">MICROBLOG_FREEDNS_SUBDOMAIN_CODE</span>=
|
|
245
|
+<span class="org-variable-name">REDMATRIX_DOMAIN_NAME</span>=
|
|
246
|
+<span class="org-variable-name">OWNCLOUD_DOMAIN_NAME</span>=
|
|
247
|
+<span class="org-variable-name">OWNCLOUD_FREEDNS_SUBDOMAIN_CODE</span>=
|
|
248
|
+<span class="org-variable-name">WIKI_TITLE</span>=
|
|
249
|
+<span class="org-variable-name">WIKI_DOMAIN_NAME</span>=
|
|
250
|
+<span class="org-variable-name">WIKI_FREEDNS_SUBDOMAIN_CODE</span>=
|
|
251
|
+<span class="org-variable-name">MY_GPG_PUBLIC_KEY</span>=
|
|
252
|
+<span class="org-variable-name">MY_GPG_PRIVATE_KEY</span>=
|
|
253
|
+<span class="org-variable-name">PUBLIC_MAILING_LIST</span>=
|
|
254
|
+<span class="org-variable-name">ROUTE_THROUGH_TOR</span>=no
|
|
255
|
+<span class="org-variable-name">LOCAL_NETWORK_STATIC_IP_ADDRESS</span>=192.168.1.60
|
|
256
|
+</pre>
|
|
257
|
+</div>
|
|
258
|
+
|
|
259
|
+<p>
|
|
260
|
+The GPG public/private key variables are for the filenames of exported GPG keys, and if a private key filename is given then it will be automatically shredded after import.
|
|
261
|
+</p>
|
|
262
|
+
|
|
263
|
+<p>
|
|
264
|
+The FreeDNS subdomain codes can be found under "Dynamic DNS" and "quick cron example". On the last line it will be the string located between the '?' and the '==' characters.
|
|
265
|
+</p>
|
|
266
|
+
|
|
267
|
+<p>
|
|
268
|
+The syntax of the <b>install-freedombone.sh</b> script is:
|
|
269
|
+</p>
|
|
270
|
+
|
|
271
|
+<div class="org-src-container">
|
|
272
|
+
|
|
273
|
+<pre class="src src-bash">./install-freedombone.sh [domain name] [username] [FreeDNS subdomain code] [optional variant type]
|
|
274
|
+</pre>
|
|
275
|
+</div>
|
|
276
|
+
|
|
277
|
+<p>
|
|
278
|
+If you don't specify a variant type with the final option then everything will be installed. If you have a <b>freedombone.cfg</b> file then it should be in the same directory as <b>install-freedombone.sh</b>.
|
|
279
|
+</p>
|
|
280
|
+
|
|
281
|
+<p>
|
|
282
|
+Installation is not quick, and depends upon which variant you choose and your internet bandwidth. Allow about three hours for a full installation on the Beaglebone Black. On the Beaglebone installation is in two parts, since a reboot is needed to enable the hardware random number generator and zram.
|
|
283
|
+</p>
|
|
284
|
+
|
|
285
|
+<p>
|
|
286
|
+When done you can ssh into the Freedombone with:
|
|
287
|
+</p>
|
|
288
|
+
|
|
289
|
+<div class="org-src-container">
|
|
290
|
+
|
|
291
|
+<pre class="src src-bash">ssh username@domain -p 2222
|
|
292
|
+</pre>
|
|
293
|
+</div>
|
|
294
|
+
|
|
295
|
+<p>
|
|
296
|
+Any manual post-installation setup instructions or passwords can be found in <b>/home/username/README</b>. You should remove any passwords from that file and store them within a password manager such as KeepassX.
|
|
297
|
+</p>
|
|
298
|
+</div>
|
|
299
|
+</div>
|
|
300
|
+
|
|
301
|
+<div id="outline-container-unnumbered-2" class="outline-2">
|
|
302
|
+<h2 id="unnumbered-2">On other hardware</h2>
|
|
303
|
+<div class="outline-text-2" id="text-unnumbered-2">
|
|
304
|
+<p>
|
|
305
|
+It's also possible to install Freedombone onto other hardware, such as an old laptop or other type of single board computer. Any system with a fresh installation of Debian Jessie will do. Just make sure that you change the variable INSTALLING_ON_BBB to "no" within <b>freedombone.cfg</b> or the <b>install-freedombone.sh</b> script. Obviously, you don't need to run the <b>initial_setup.sh</b> script on non-Beaglebone systems.
|
|
306
|
+</p>
|
|
307
|
+</div>
|
|
308
|
+</div>
|
|
309
|
+<div id="outline-container-unnumbered-3" class="outline-2">
|
|
310
|
+<h2 id="unnumbered-3">Internet Router</h2>
|
|
311
|
+<div class="outline-text-2" id="text-unnumbered-3">
|
|
312
|
+<p>
|
|
313
|
+On your internet router, typically under firewall settings, open the following ports and forward them to the Freedombone.
|
|
314
|
+</p>
|
|
315
|
+
|
|
316
|
+<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+<colgroup>
|
|
320
|
+<col class="left" />
|
|
321
|
+
|
|
322
|
+<col class="right" />
|
|
323
|
+</colgroup>
|
|
324
|
+<thead>
|
|
325
|
+<tr>
|
|
326
|
+<th scope="col" class="left">Service</th>
|
|
327
|
+<th scope="col" class="right">Ports</th>
|
|
328
|
+</tr>
|
|
329
|
+</thead>
|
|
330
|
+<tbody>
|
|
331
|
+<tr>
|
|
332
|
+<td class="left">HTTP</td>
|
|
333
|
+<td class="right">80</td>
|
|
334
|
+</tr>
|
|
335
|
+
|
|
336
|
+<tr>
|
|
337
|
+<td class="left">HTTPS</td>
|
|
338
|
+<td class="right">443</td>
|
|
339
|
+</tr>
|
|
340
|
+
|
|
341
|
+<tr>
|
|
342
|
+<td class="left">SSH</td>
|
|
343
|
+<td class="right">2222</td>
|
|
344
|
+</tr>
|
|
345
|
+
|
|
346
|
+<tr>
|
|
347
|
+<td class="left">DLNA</td>
|
|
348
|
+<td class="right">1900</td>
|
|
349
|
+</tr>
|
|
350
|
+
|
|
351
|
+<tr>
|
|
352
|
+<td class="left">DLNA</td>
|
|
353
|
+<td class="right">8200</td>
|
|
354
|
+</tr>
|
|
355
|
+
|
|
356
|
+<tr>
|
|
357
|
+<td class="left">XMPP</td>
|
|
358
|
+<td class="right">5222..5223</td>
|
|
359
|
+</tr>
|
|
360
|
+
|
|
361
|
+<tr>
|
|
362
|
+<td class="left">XMPP</td>
|
|
363
|
+<td class="right">5269</td>
|
|
364
|
+</tr>
|
|
365
|
+
|
|
366
|
+<tr>
|
|
367
|
+<td class="left">XMPP</td>
|
|
368
|
+<td class="right">5280..5281</td>
|
|
369
|
+</tr>
|
|
370
|
+
|
|
371
|
+<tr>
|
|
372
|
+<td class="left">IRC</td>
|
|
373
|
+<td class="right">6697</td>
|
|
374
|
+</tr>
|
|
375
|
+
|
|
376
|
+<tr>
|
|
377
|
+<td class="left">IRC</td>
|
|
378
|
+<td class="right">9999</td>
|
|
379
|
+</tr>
|
|
380
|
+
|
|
381
|
+<tr>
|
|
382
|
+<td class="left">Git</td>
|
|
383
|
+<td class="right">9418</td>
|
|
384
|
+</tr>
|
|
385
|
+
|
|
386
|
+<tr>
|
|
387
|
+<td class="left">Email</td>
|
|
388
|
+<td class="right">25</td>
|
|
389
|
+</tr>
|
|
390
|
+
|
|
391
|
+<tr>
|
|
392
|
+<td class="left">Email</td>
|
|
393
|
+<td class="right">587</td>
|
|
394
|
+</tr>
|
|
395
|
+
|
|
396
|
+<tr>
|
|
397
|
+<td class="left">Email</td>
|
|
398
|
+<td class="right">465</td>
|
|
399
|
+</tr>
|
|
400
|
+
|
|
401
|
+<tr>
|
|
402
|
+<td class="left">Email</td>
|
|
403
|
+<td class="right">993</td>
|
|
404
|
+</tr>
|
|
405
|
+</tbody>
|
|
406
|
+</table>
|
|
407
|
+</div>
|
|
408
|
+</div>
|
|
409
|
+</div>
|
|
410
|
+<div id="postamble" class="status">
|
|
411
|
+
|
|
412
|
+<style type="text/css">
|
|
413
|
+.back-to-top {
|
|
414
|
+ position: fixed;
|
|
415
|
+ bottom: 2em;
|
|
416
|
+ right: 0px;
|
|
417
|
+ text-decoration: none;
|
|
418
|
+ color: #000000;
|
|
419
|
+ background-color: rgba(235, 235, 235, 0.80);
|
|
420
|
+ font-size: 12px;
|
|
421
|
+ padding: 1em;
|
|
422
|
+ display: none;
|
|
423
|
+}
|
|
424
|
+
|
|
425
|
+.back-to-top:hover {
|
|
426
|
+ background-color: rgba(135, 135, 135, 0.50);
|
|
427
|
+}
|
|
428
|
+</style>
|
|
429
|
+
|
|
430
|
+<div class="back-to-top">
|
|
431
|
+<a href="#top">Back to top</a> | <a href="mailto:bob@robotics.uk.to">E-mail me</a>
|
|
432
|
+</div>
|
|
433
|
+
|
|
434
|
+<script type="text/javascript">
|
|
435
|
+ var offset = 220;
|
|
436
|
+ var duration = 500;
|
|
437
|
+ jQuery(window).scroll(function() {
|
|
438
|
+ if (jQuery(this).scrollTop() > offset) {
|
|
439
|
+ jQuery('.back-to-top').fadeIn(duration);
|
|
440
|
+ } else {
|
|
441
|
+ jQuery('.back-to-top').fadeOut(duration);
|
|
442
|
+ }
|
|
443
|
+ });
|
|
444
|
+</script>
|
|
445
|
+</div>
|
|
446
|
+</body>
|
|
447
|
+</html>
|