Bob Mottram 10 years ago
parent
commit
7238038863
4 changed files with 706 additions and 2 deletions
  1. 185
    0
      faq.org
  2. 1
    1
      index.org
  3. 516
    0
      website/faq.html
  4. 4
    1
      website/index.html

+ 185
- 0
faq.org View File

@@ -0,0 +1,185 @@
1
+#+TITLE:
2
+#+AUTHOR: Bob Mottram
3
+#+EMAIL: bob@robotics.uk.to
4
+#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
5
+#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
6
+#+OPTIONS: ^:nil
7
+#+BEGIN_CENTER
8
+[[./images/logo.png]]
9
+#+END_CENTER
10
+
11
+#+BEGIN_CENTER
12
+#+ATTR_HTML: :border -1
13
+| [[file:index.html][Home]]                                   |
14
+| [[Why not supply a disk image download?]]  |
15
+| [[Is metadata protected?]]                 |
16
+| [[How do I get a domain name?]]            |
17
+| [[How do I get a "real" SSL certificate?]] |
18
+| [[Why use self-signed certificates?]]      |
19
+
20
+#+END_CENTER
21
+
22
+* Why not supply a disk image download?
23
+Shipping a Freedombone disk image ready to install on a flash disk would be easy, but disk images are relatively opaque. It would be quite easy to hide something nasty within a disk image and the user might never know. To guard against that possibility installing via the /install-freedombone.sh/ script is a lot more transparent. You can check the code to see exactly what it's doing, and the packages are all downloaded from standard Debian repos (you can even choose which one you trust) or git repos. Doing it this way the system is fully auditable, whereas when shipping a disk image it's harder to be confident that no nefarious extras have been added.
24
+* Is metadata protected?
25
+Even when using Freedombone metadata analysis by third parties is still possible. They might have a much harder time knowing what the content is, but they can potentially construct extensive dossiers based upon who communicated with your server when.  Metadata leakage is a general problem with most current web systems and it is hoped that more secure technology will become available in future. But for now if metadata protection is your main concern using Freedombone won't help.
26
+* How do I get a domain name?
27
+Suppose that you have bought a domain name (rather than using a free subdomain on freedns) and you want to use that instead.
28
+
29
+Remove any existing nameservers for your domain (or select "custom" nameservers), then add:
30
+
31
+#+BEGIN_SRC bash
32
+NS1.AFRAID.ORG
33
+NS2.AFRAID.ORG
34
+NS3.AFRAID.ORG
35
+NS4.AFRAID.ORG
36
+#+END_SRC
37
+
38
+It might take a few minutes for the above change to take effect.  Within freedns click on "Domains" and add your domains (this might only be available to paid members).  Make sure that they're marked as "private".
39
+
40
+Select "Subdomains" from the menu on the left then select the MX entry for your domain and change the destination to *10:mydomainname* rather than *10:mail.mydomainname*.
41
+
42
+To route email to one of your freedns domains:
43
+
44
+#+BEGIN_SRC bash
45
+editor /etc/mailname
46
+#+END_SRC
47
+
48
+Add any extra domains which you own, then save and exit.
49
+
50
+#+BEGIN_SRC bash
51
+editor /etc/exim4/update-exim4.conf.conf
52
+#+END_SRC
53
+
54
+Within dc_other_hostnames add your extra domain names, separated by a colon ':' character.
55
+
56
+Save and exit, then restart exim.
57
+
58
+#+BEGIN_SRC bash
59
+update-exim4.conf.template -r
60
+update-exim4.conf
61
+service exim4 restart
62
+#+END_SRC
63
+
64
+You should now be able to send an email from /postmaster@mynewdomainname/ and it should arrive in your inbox.
65
+
66
+* How do I get a "real" SSL certificate?
67
+You can obtain a free "official" (as in recognised by default by web browsers) SSL certificate from [[https://www.startssl.com/][StartSSL]]. You will first need to have bought a domain name, since it's not possible to obtain one for a freedns subdomain, so see [[Using your own domain]] for details of how to do that.  You should also have tested that you can send email to the domain and receive it on the Freedombone (via Mutt or any other email client).
68
+
69
+When creating a SSL certificate it's important that the private key (the private component of the public/private pair in [[https://en.wikipedia.org/wiki/Public-key_cryptography][public key cryptography]]) be generated on the Freedombone /and remain there/.  Don't generate the private key via the StartSSL certificate wizard because this means that potentially they may retain a copy of it which could then be exfiltrated either via [[https://en.wikipedia.org/wiki/Lavabit][Lavabit]] style methodology, "implants", compromised sysadmins or other "side channel" methods.  So that the private key isn't broadcast on the internet we can instead generate a certificate request, which is really just a request for authorisation of a public key.
70
+
71
+Firstly you should have a web server site configuration ready to go. See [[Setting up a web site]] for details.
72
+
73
+Within StartSSL under the validations wizard validate your domain, which means sending an email to it and confirming a code.
74
+
75
+Now we can generate the certificate request as follows.
76
+
77
+#+BEGIN_SRC bash
78
+export HOSTNAME=mydomainname.com
79
+openssl genrsa -out /etc/ssl/private/$HOSTNAME.key 2048
80
+chown root:ssl-cert /etc/ssl/private/$HOSTNAME.key
81
+chmod 440 /etc/ssl/private/$HOSTNAME.key
82
+mkdir /etc/ssl/requests
83
+#+END_SRC
84
+
85
+Now make a certificate request as follows.  You should copy and paste the whole of this, not just line by line.
86
+
87
+#+BEGIN_SRC bash
88
+openssl req -new -sha256 -key /etc/ssl/private/$HOSTNAME.key -out /etc/ssl/requests/$HOSTNAME.csr
89
+#+END_SRC
90
+
91
+For the email address it's a good idea to use postmaster@mydomainname.
92
+
93
+Use a random 20 character password, and keep a note of it.  We'll remove this later.
94
+
95
+View the request with:
96
+
97
+#+BEGIN_SRC bash
98
+cat /etc/ssl/requests/$HOSTNAME.csr
99
+#+END_SRC
100
+
101
+You can then click on "skip" within the StartSSL certificates wizard and copy and paste the encrypted request into the text entry box.  A confirmation will be emailed back to you normally within a few hours.
102
+
103
+Log into your StartSSL account and select *Retrieve Certificate* from the *Tool Box* tab.  Copy the text.
104
+
105
+#+BEGIN_SRC bash
106
+editor /etc/ssl/certs/$HOSTNAME.crt
107
+#+END_SRC
108
+
109
+Paste the public key, then save and exit.  Then on the Freedombone.
110
+
111
+#+BEGIN_SRC bash
112
+mkdir /etc/ssl/roots
113
+mkdir /etc/ssl/chains
114
+wget "http://www.startssl.com/certs/ca.pem" --output-document="/etc/ssl/roots/startssl-root.ca"
115
+wget "http://www.startssl.com/certs/sub.class1.server.ca.pem" --output-document="/etc/ssl/chains/startssl-sub.class1.server.ca.pem"
116
+wget "http://www.startssl.com/certs/sub.class2.server.ca.pem" --output-document="/etc/ssl/chains/startssl-sub.class2.server.ca.pem"
117
+wget "http://www.startssl.com/certs/sub.class3.server.ca.pem" --output-document="/etc/ssl/chains/startssl-sub.class3.server.ca.pem"
118
+ln -s "/etc/ssl/roots/startssl-root.ca" "/etc/ssl/roots/$HOSTNAME-root.ca"
119
+ln -s "/etc/ssl/chains/startssl-sub.class1.server.ca.pem" "/etc/ssl/chains/$HOSTNAME.ca"
120
+cp "/etc/ssl/certs/$HOSTNAME.crt" "/etc/ssl/certs/$HOSTNAME.crt+chain+root"
121
+test -e "/etc/ssl/chains/$HOSTNAME.ca" && cat "/etc/ssl/chains/$HOSTNAME.ca" >> "/etc/ssl/certs/$HOSTNAME.crt+chain+root"
122
+test -e "/etc/ssl/roots/$HOSTNAME-root.ca" && cat "/etc/ssl/roots/$HOSTNAME-root.ca" >> "/etc/ssl/certs/$HOSTNAME.crt+chain+root"
123
+#+END_SRC
124
+
125
+To avoid any possibility of the certificates being accidentally overwritten by self-signed ones at a later date you can create backups.
126
+
127
+#+BEGIN_SRC bash
128
+mkdir /etc/ssl/backups
129
+mkdir /etc/ssl/backups/certs
130
+mkdir /etc/ssl/backups/private
131
+cp /etc/ssl/certs/$HOSTNAME* /etc/ssl/backups/certs/
132
+cp /etc/ssl/private/$HOSTNAME* /etc/ssl/backups/private/
133
+chmod -R 400 /etc/ssl/backups/certs/*
134
+chmod -R 400 /etc/ssl/backups/private/*
135
+#+END_SRC
136
+
137
+Remove the certificate password, so if the server is rebooted then it won't wait indefinitely for a non-existant keyboard user to type in a password.
138
+
139
+#+BEGIN_SRC bash
140
+openssl rsa -in /etc/ssl/private/$HOSTNAME.key -out /etc/ssl/private/$HOSTNAME.new.key
141
+cp /etc/ssl/private/$HOSTNAME.new.key /etc/ssl/private/$HOSTNAME.key
142
+shred -zu /etc/ssl/private/$HOSTNAME.new.key
143
+#+END_SRC
144
+
145
+Create a bundled certificate which joins the certificate and chain file together.
146
+
147
+#+BEGIN_SRC bash
148
+cat /etc/ssl/certs/$HOSTNAME.crt /etc/ssl/chains/startssl-sub.class1.server.ca.pem > /etc/ssl/certs/$HOSTNAME.bundle.crt
149
+#+END_SRC
150
+
151
+And also add it to the overall bundle of certificates for the Freedombone. This will allow you to easily install the certificates onto other systems.
152
+
153
+#+BEGIN_SRC bash
154
+mkdir /etc/ssl/mycerts
155
+cp /etc/ssl/certs/$HOSTNAME.bundle.crt /etc/ssl/mycerts
156
+cat /etc/ssl/mycerts/*.crt > /etc/ssl/freedombone-bundle.crt
157
+tar -czvf /etc/ssl/freedombone-certs.tar.gz /etc/ssl/mycerts/*.crt
158
+#+END_SRC
159
+
160
+Edit your configuration file.
161
+
162
+#+BEGIN_SRC bash
163
+editor /etc/nginx/sites-available/$HOSTNAME
164
+#+END_SRC
165
+
166
+Add the following to the section which starts with *listen 443*
167
+
168
+#+BEGIN_SRC bash
169
+    ssl_certificate /etc/ssl/certs/mydomainname.com.bundle.crt;
170
+#+END_SRC
171
+
172
+Save and exit, then restart the web server.
173
+
174
+#+BEGIN_SRC bash
175
+service nginx restart
176
+#+END_SRC
177
+
178
+Now visit your web site at https://mydomainname.com and you should notice that there is no certificate warning displayed.  You will now be able to install systems which don't allow the use of self-signed certificates, such as [[https://redmatrix.me/&JS=1][Red Matrix]].
179
+
180
+* Why use self-signed certificates?
181
+Almost everywhere on the web you will read that self-signed certificates are worthless. They bring up scary looking browser warnings and gurus will advise you not to use them. Self-signed certificates are quite useful though. What the scary warnings mean - and it would be good if they explained this more clearly - is that you have an encrypted connection established but there is /no certainty about who that connection is with/. The usual solution to this is to get a "real" SSL certificate from one of the certificate authorities, but it's far from clear that such authorities can be trusted. There have been various scandals involving such organisations, and it does not seem plausible to assume that they are somehow immune to the sort of treatment which [[http://en.wikipedia.org/wiki/Lavabit][Lavabit]] received. So although most internet users have been trained to look for the lock icon as an indication that the connection is secured that belief may not always be well founded.
182
+
183
+Security of web sites on the internet is still a somewhat unsolved problem, and what we have now is a less than ideal but /good enough to fool most of the people most of the time/ kind of arrangement. Long term a better solution might be to have a number of certificate authorities in a number of different jurisdictions vote on whether a given certificate actually belongs to a given domain name. Experimental systems like this exist, but they're not widely used. Since the current certificate system has an enormous amount of inertia behind it change could be slow in arriving.
184
+
185
+For now a self-signed certificate will probably in most cases protect your communications from "bulk" passive surveillance. Once you've got past the scary browser warning and accepted the certificate under most conditions (except when starting up the Tor browser) you should not repeatedly see that warning. If you do then someone may be trying to meddle with your connection to the server. You can also take a note of the fingerprint of the certificate and verify that if you are especially concerned. If the fingerprint remains the same then you're probably ok.

+ 1
- 1
index.org View File

@@ -10,7 +10,7 @@
10 10
 
11 11
 #+BEGIN_CENTER
12 12
 #+ATTR_HTML: :border -1
13
-| [[./variants.html][Variants]] | [[./installation.html][Installation]] | [[./usage.html][How to use it]] | [[./code.html][Code]] | [[./related.html][Related Projects]] | [[https://www.gnu.org/licenses/gpl-3.0-standalone.html][License]] |
13
+| [[./variants.html][Variants]] | [[./installation.html][Installation]] | [[./usage.html][How to use it]] | [[./code.html][Code]] | [[./related.html][Related Projects]] | [[file:faq.html][FAQ]] | [[https://www.gnu.org/licenses/gpl-3.0-standalone.html][License]]  |
14 14
 #+END_CENTER
15 15
 
16 16
 Today everyone is concerned about privacy on the internet.  At the same time there's a problem with the companies who have traditionally provided most of the web services. The people running those companies may be well-intentioned - as in the famous motto "/don't be evil/" - but the advertising based business model which currently dominates, combined with an increasing level of political pressure to insert backdoors means that it is usually impossible for companies operating within both their own business models and the framework of national laws to provide you with services which don't intentionally leak your private communications to advertisers, insurers or governments.

+ 516
- 0
website/faq.html View File

@@ -0,0 +1,516 @@
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-28 Tue 21:50 -->
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
+
159
+<div class="center">
160
+<table border="-1" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
161
+
162
+
163
+<colgroup>
164
+<col  class="left" />
165
+</colgroup>
166
+<tbody>
167
+<tr>
168
+<td class="left"><a href="index.html">Home</a></td>
169
+</tr>
170
+
171
+<tr>
172
+<td class="left"><a href="#unnumbered-1">Why not supply a disk image download?</a></td>
173
+</tr>
174
+
175
+<tr>
176
+<td class="left"><a href="#unnumbered-2">Is metadata protected?</a></td>
177
+</tr>
178
+
179
+<tr>
180
+<td class="left"><a href="#unnumbered-3">How do I get a domain name?</a></td>
181
+</tr>
182
+
183
+<tr>
184
+<td class="left"><a href="#unnumbered-4">How do I get a "real" SSL certificate?</a></td>
185
+</tr>
186
+
187
+<tr>
188
+<td class="left"><a href="#unnumbered-5">Why use self-signed certificates?</a></td>
189
+</tr>
190
+</tbody>
191
+</table>
192
+</div>
193
+
194
+<div id="outline-container-unnumbered-1" class="outline-2">
195
+<h2 id="unnumbered-1">Why not supply a disk image download?</h2>
196
+<div class="outline-text-2" id="text-unnumbered-1">
197
+<p>
198
+Shipping a Freedombone disk image ready to install on a flash disk would be easy, but disk images are relatively opaque. It would be quite easy to hide something nasty within a disk image and the user might never know. To guard against that possibility installing via the <i>install-freedombone.sh</i> script is a lot more transparent. You can check the code to see exactly what it's doing, and the packages are all downloaded from standard Debian repos (you can even choose which one you trust) or git repos. Doing it this way the system is fully auditable, whereas when shipping a disk image it's harder to be confident that no nefarious extras have been added.
199
+</p>
200
+</div>
201
+</div>
202
+<div id="outline-container-unnumbered-2" class="outline-2">
203
+<h2 id="unnumbered-2">Is metadata protected?</h2>
204
+<div class="outline-text-2" id="text-unnumbered-2">
205
+<p>
206
+Even when using Freedombone metadata analysis by third parties is still possible. They might have a much harder time knowing what the content is, but they can potentially construct extensive dossiers based upon who communicated with your server when.  Metadata leakage is a general problem with most current web systems and it is hoped that more secure technology will become available in future. But for now if metadata protection is your main concern using Freedombone won't help.
207
+</p>
208
+</div>
209
+</div>
210
+<div id="outline-container-unnumbered-3" class="outline-2">
211
+<h2 id="unnumbered-3">How do I get a domain name?</h2>
212
+<div class="outline-text-2" id="text-unnumbered-3">
213
+<p>
214
+Suppose that you have bought a domain name (rather than using a free subdomain on freedns) and you want to use that instead.
215
+</p>
216
+
217
+<p>
218
+Remove any existing nameservers for your domain (or select "custom" nameservers), then add:
219
+</p>
220
+
221
+<div class="org-src-container">
222
+
223
+<pre class="src src-bash">NS1.AFRAID.ORG
224
+NS2.AFRAID.ORG
225
+NS3.AFRAID.ORG
226
+NS4.AFRAID.ORG
227
+</pre>
228
+</div>
229
+
230
+<p>
231
+It might take a few minutes for the above change to take effect.  Within freedns click on "Domains" and add your domains (this might only be available to paid members).  Make sure that they're marked as "private".
232
+</p>
233
+
234
+<p>
235
+Select "Subdomains" from the menu on the left then select the MX entry for your domain and change the destination to <b>10:mydomainname</b> rather than <b>10:mail.mydomainname</b>.
236
+</p>
237
+
238
+<p>
239
+To route email to one of your freedns domains:
240
+</p>
241
+
242
+<div class="org-src-container">
243
+
244
+<pre class="src src-bash">editor /etc/mailname
245
+</pre>
246
+</div>
247
+
248
+<p>
249
+Add any extra domains which you own, then save and exit.
250
+</p>
251
+
252
+<div class="org-src-container">
253
+
254
+<pre class="src src-bash">editor /etc/exim4/update-exim4.conf.conf
255
+</pre>
256
+</div>
257
+
258
+<p>
259
+Within dc_other_hostnames add your extra domain names, separated by a colon ':' character.
260
+</p>
261
+
262
+<p>
263
+Save and exit, then restart exim.
264
+</p>
265
+
266
+<div class="org-src-container">
267
+
268
+<pre class="src src-bash">update-exim4.conf.template -r
269
+update-exim4.conf
270
+service exim4 restart
271
+</pre>
272
+</div>
273
+
274
+<p>
275
+You should now be able to send an email from <i>postmaster@mynewdomainname</i> and it should arrive in your inbox.
276
+</p>
277
+</div>
278
+</div>
279
+
280
+<div id="outline-container-unnumbered-4" class="outline-2">
281
+<h2 id="unnumbered-4">How do I get a "real" SSL certificate?</h2>
282
+<div class="outline-text-2" id="text-unnumbered-4">
283
+<p>
284
+You can obtain a free "official" (as in recognised by default by web browsers) SSL certificate from <a href="https://www.startssl.com/">StartSSL</a>. You will first need to have bought a domain name, since it's not possible to obtain one for a freedns subdomain, so see <i>Using your own domain</i> for details of how to do that.  You should also have tested that you can send email to the domain and receive it on the Freedombone (via Mutt or any other email client).
285
+</p>
286
+
287
+<p>
288
+When creating a SSL certificate it's important that the private key (the private component of the public/private pair in <a href="https://en.wikipedia.org/wiki/Public-key_cryptography">public key cryptography</a>) be generated on the Freedombone <i>and remain there</i>.  Don't generate the private key via the StartSSL certificate wizard because this means that potentially they may retain a copy of it which could then be exfiltrated either via <a href="https://en.wikipedia.org/wiki/Lavabit">Lavabit</a> style methodology, "implants", compromised sysadmins or other "side channel" methods.  So that the private key isn't broadcast on the internet we can instead generate a certificate request, which is really just a request for authorisation of a public key.
289
+</p>
290
+
291
+<p>
292
+Firstly you should have a web server site configuration ready to go. See <i>Setting up a web site</i> for details.
293
+</p>
294
+
295
+<p>
296
+Within StartSSL under the validations wizard validate your domain, which means sending an email to it and confirming a code.
297
+</p>
298
+
299
+<p>
300
+Now we can generate the certificate request as follows.
301
+</p>
302
+
303
+<div class="org-src-container">
304
+
305
+<pre class="src src-bash"><span class="org-builtin">export</span> <span class="org-variable-name">HOSTNAME</span>=mydomainname.com
306
+openssl genrsa -out /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>.key 2048
307
+chown root:ssl-cert /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>.key
308
+chmod 440 /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>.key
309
+mkdir /etc/ssl/requests
310
+</pre>
311
+</div>
312
+
313
+<p>
314
+Now make a certificate request as follows.  You should copy and paste the whole of this, not just line by line.
315
+</p>
316
+
317
+<div class="org-src-container">
318
+
319
+<pre class="src src-bash">openssl req -new -sha256 -key /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>.key -out /etc/ssl/requests/$<span class="org-variable-name">HOSTNAME</span>.csr
320
+</pre>
321
+</div>
322
+
323
+<p>
324
+For the email address it's a good idea to use postmaster@mydomainname.
325
+</p>
326
+
327
+<p>
328
+Use a random 20 character password, and keep a note of it.  We'll remove this later.
329
+</p>
330
+
331
+<p>
332
+View the request with:
333
+</p>
334
+
335
+<div class="org-src-container">
336
+
337
+<pre class="src src-bash">cat /etc/ssl/requests/$<span class="org-variable-name">HOSTNAME</span>.csr
338
+</pre>
339
+</div>
340
+
341
+<p>
342
+You can then click on "skip" within the StartSSL certificates wizard and copy and paste the encrypted request into the text entry box.  A confirmation will be emailed back to you normally within a few hours.
343
+</p>
344
+
345
+<p>
346
+Log into your StartSSL account and select <b>Retrieve Certificate</b> from the <b>Tool Box</b> tab.  Copy the text.
347
+</p>
348
+
349
+<div class="org-src-container">
350
+
351
+<pre class="src src-bash">editor /etc/ssl/certs/$<span class="org-variable-name">HOSTNAME</span>.crt
352
+</pre>
353
+</div>
354
+
355
+<p>
356
+Paste the public key, then save and exit.  Then on the Freedombone.
357
+</p>
358
+
359
+<div class="org-src-container">
360
+
361
+<pre class="src src-bash">mkdir /etc/ssl/roots
362
+mkdir /etc/ssl/chains
363
+wget <span class="org-string">"http://www.startssl.com/certs/ca.pem"</span> --output-document=<span class="org-string">"/etc/ssl/roots/startssl-root.ca"</span>
364
+wget <span class="org-string">"http://www.startssl.com/certs/sub.class1.server.ca.pem"</span> --output-document=<span class="org-string">"/etc/ssl/chains/startssl-sub.class1.server.ca.pem"</span>
365
+wget <span class="org-string">"http://www.startssl.com/certs/sub.class2.server.ca.pem"</span> --output-document=<span class="org-string">"/etc/ssl/chains/startssl-sub.class2.server.ca.pem"</span>
366
+wget <span class="org-string">"http://www.startssl.com/certs/sub.class3.server.ca.pem"</span> --output-document=<span class="org-string">"/etc/ssl/chains/startssl-sub.class3.server.ca.pem"</span>
367
+ln -s <span class="org-string">"/etc/ssl/roots/startssl-root.ca"</span> <span class="org-string">"/etc/ssl/roots/$HOSTNAME-root.ca"</span>
368
+ln -s <span class="org-string">"/etc/ssl/chains/startssl-sub.class1.server.ca.pem"</span> <span class="org-string">"/etc/ssl/chains/$HOSTNAME.ca"</span>
369
+cp <span class="org-string">"/etc/ssl/certs/$HOSTNAME.crt"</span> <span class="org-string">"/etc/ssl/certs/$HOSTNAME.crt+chain+root"</span>
370
+<span class="org-builtin">test</span> -e <span class="org-string">"/etc/ssl/chains/$HOSTNAME.ca"</span> &amp;&amp; cat <span class="org-string">"/etc/ssl/chains/$HOSTNAME.ca"</span> &gt;&gt; <span class="org-string">"/etc/ssl/certs/$HOSTNAME.crt+chain+root"</span>
371
+<span class="org-builtin">test</span> -e <span class="org-string">"/etc/ssl/roots/$HOSTNAME-root.ca"</span> &amp;&amp; cat <span class="org-string">"/etc/ssl/roots/$HOSTNAME-root.ca"</span> &gt;&gt; <span class="org-string">"/etc/ssl/certs/$HOSTNAME.crt+chain+root"</span>
372
+</pre>
373
+</div>
374
+
375
+<p>
376
+To avoid any possibility of the certificates being accidentally overwritten by self-signed ones at a later date you can create backups.
377
+</p>
378
+
379
+<div class="org-src-container">
380
+
381
+<pre class="src src-bash">mkdir /etc/ssl/backups
382
+mkdir /etc/ssl/backups/certs
383
+mkdir /etc/ssl/backups/private
384
+cp /etc/ssl/certs/$<span class="org-variable-name">HOSTNAME</span>* /etc/ssl/backups/certs/
385
+cp /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>* /etc/ssl/backups/private/
386
+chmod -R 400 /etc/ssl/backups/certs/*
387
+chmod -R 400 /etc/ssl/backups/private/*
388
+</pre>
389
+</div>
390
+
391
+<p>
392
+Remove the certificate password, so if the server is rebooted then it won't wait indefinitely for a non-existant keyboard user to type in a password.
393
+</p>
394
+
395
+<div class="org-src-container">
396
+
397
+<pre class="src src-bash">openssl rsa -in /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>.key -out /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>.new.key
398
+cp /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>.new.key /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>.key
399
+shred -zu /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>.new.key
400
+</pre>
401
+</div>
402
+
403
+<p>
404
+Create a bundled certificate which joins the certificate and chain file together.
405
+</p>
406
+
407
+<div class="org-src-container">
408
+
409
+<pre class="src src-bash">cat /etc/ssl/certs/$<span class="org-variable-name">HOSTNAME</span>.crt /etc/ssl/chains/startssl-sub.class1.server.ca.pem &gt; /etc/ssl/certs/$<span class="org-variable-name">HOSTNAME</span>.bundle.crt
410
+</pre>
411
+</div>
412
+
413
+<p>
414
+And also add it to the overall bundle of certificates for the Freedombone. This will allow you to easily install the certificates onto other systems.
415
+</p>
416
+
417
+<div class="org-src-container">
418
+
419
+<pre class="src src-bash">mkdir /etc/ssl/mycerts
420
+cp /etc/ssl/certs/$<span class="org-variable-name">HOSTNAME</span>.bundle.crt /etc/ssl/mycerts
421
+cat /etc/ssl/mycerts/*.crt &gt; /etc/ssl/freedombone-bundle.crt
422
+tar -czvf /etc/ssl/freedombone-certs.tar.gz /etc/ssl/mycerts/*.crt
423
+</pre>
424
+</div>
425
+
426
+<p>
427
+Edit your configuration file.
428
+</p>
429
+
430
+<div class="org-src-container">
431
+
432
+<pre class="src src-bash">editor /etc/nginx/sites-available/$<span class="org-variable-name">HOSTNAME</span>
433
+</pre>
434
+</div>
435
+
436
+<p>
437
+Add the following to the section which starts with <b>listen 443</b>
438
+</p>
439
+
440
+<div class="org-src-container">
441
+
442
+<pre class="src src-bash">ssl_certificate /etc/ssl/certs/mydomainname.com.bundle.crt;
443
+</pre>
444
+</div>
445
+
446
+<p>
447
+Save and exit, then restart the web server.
448
+</p>
449
+
450
+<div class="org-src-container">
451
+
452
+<pre class="src src-bash">service nginx restart
453
+</pre>
454
+</div>
455
+
456
+<p>
457
+Now visit your web site at <a href="https://mydomainname.com/">https://mydomainname.com/</a> and you should notice that there is no certificate warning displayed.  You will now be able to install systems which don't allow the use of self-signed certificates, such as <a href="https://redmatrix.me/&JS=1">Red Matrix</a>.
458
+</p>
459
+</div>
460
+</div>
461
+
462
+<div id="outline-container-unnumbered-5" class="outline-2">
463
+<h2 id="unnumbered-5">Why use self-signed certificates?</h2>
464
+<div class="outline-text-2" id="text-unnumbered-5">
465
+<p>
466
+Almost everywhere on the web you will read that self-signed certificates are worthless. They bring up scary looking browser warnings and gurus will advise you not to use them. Self-signed certificates are quite useful though. What the scary warnings mean - and it would be good if they explained this more clearly - is that you have an encrypted connection established but there is <i>no certainty about who that connection is with</i>. The usual solution to this is to get a "real" SSL certificate from one of the certificate authorities, but it's far from clear that such authorities can be trusted. There have been various scandals involving such organisations, and it does not seem plausible to assume that they are somehow immune to the sort of treatment which <a href="http://en.wikipedia.org/wiki/Lavabit">Lavabit</a> encountered. So although most internet users have been trained to look for the lock icon as an indication that the connection is secured that belief may not always be well founded.
467
+</p>
468
+
469
+<p>
470
+Security of web sites on the internet is still a somewhat unsolved problem, and what we have now is a less than ideal but <i>good enough to fool most of the people most of the time</i> kind of arrangement. Long term a better solution might be to have a number of certificate authorities in a number of different jurisdictions vote on whether a given certificate actually belongs to a given domain name. Experimental systems like this exist, but they're not widely used. Since the current certificate system has an enormous amount of inertia behind it change could be slow in arrival.
471
+</p>
472
+
473
+<p>
474
+For now a self-signed certificate will probably in most cases protect your communications from passive surveillance. Once you've got past the scary browser warning and accepted the certificate under most conditions (except when using the Tor browser) you should not repeatedly see that warning. If you do then someone may be trying to meddle with your connection to the server. You can also take a note of the fingerprint of the certificate and check that if you are especially concerned. If the fingerprint remains the same then you're probably ok.
475
+</p>
476
+</div>
477
+</div>
478
+</div>
479
+<div id="postamble" class="status">
480
+
481
+<style type="text/css">
482
+.back-to-top {
483
+    position: fixed;
484
+    bottom: 2em;
485
+    right: 0px;
486
+    text-decoration: none;
487
+    color: #000000;
488
+    background-color: rgba(235, 235, 235, 0.80);
489
+    font-size: 12px;
490
+    padding: 1em;
491
+    display: none;
492
+}
493
+
494
+.back-to-top:hover {
495
+    background-color: rgba(135, 135, 135, 0.50);
496
+}
497
+</style>
498
+
499
+<div class="back-to-top">
500
+<a href="#top">Back to top</a> | <a href="mailto:bob@robotics.uk.to">E-mail me</a>
501
+</div>
502
+
503
+<script type="text/javascript">
504
+    var offset = 220;
505
+    var duration = 500;
506
+    jQuery(window).scroll(function() {
507
+        if (jQuery(this).scrollTop() > offset) {
508
+            jQuery('.back-to-top').fadeIn(duration);
509
+        } else {
510
+            jQuery('.back-to-top').fadeOut(duration);
511
+        }
512
+    });
513
+</script>
514
+</div>
515
+</body>
516
+</html>

+ 4
- 1
website/index.html View File

@@ -4,7 +4,7 @@
4 4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5 5
 <head>
6 6
 <title></title>
7
-<!-- 2014-10-26 Sun 20:48 -->
7
+<!-- 2014-10-28 Tue 19:23 -->
8 8
 <meta  http-equiv="Content-Type" content="text/html;charset=utf-8" />
9 9
 <meta  name="generator" content="Org-mode" />
10 10
 <meta  name="author" content="Bob Mottram" />
@@ -172,6 +172,8 @@ for the JavaScript code in this tag.
172 172
 <col  class="left" />
173 173
 
174 174
 <col  class="left" />
175
+
176
+<col  class="left" />
175 177
 </colgroup>
176 178
 <tbody>
177 179
 <tr>
@@ -180,6 +182,7 @@ for the JavaScript code in this tag.
180 182
 <td class="left"><a href="./usage.html">How to use it</a></td>
181 183
 <td class="left"><a href="./code.html">Code</a></td>
182 184
 <td class="left"><a href="./related.html">Related Projects</a></td>
185
+<td class="left"><a href="faq.html">FAQ</a></td>
183 186
 <td class="left"><a href="https://www.gnu.org/licenses/gpl-3.0-standalone.html">License</a></td>
184 187
 </tr>
185 188
 </tbody>