faq
This commit is contained in:
parent
708eab2f9c
commit
7238038863
|
@ -0,0 +1,185 @@
|
|||
#+TITLE:
|
||||
#+AUTHOR: Bob Mottram
|
||||
#+EMAIL: bob@robotics.uk.to
|
||||
#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
|
||||
#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
|
||||
#+OPTIONS: ^:nil
|
||||
#+BEGIN_CENTER
|
||||
[[./images/logo.png]]
|
||||
#+END_CENTER
|
||||
|
||||
#+BEGIN_CENTER
|
||||
#+ATTR_HTML: :border -1
|
||||
| [[file:index.html][Home]] |
|
||||
| [[Why not supply a disk image download?]] |
|
||||
| [[Is metadata protected?]] |
|
||||
| [[How do I get a domain name?]] |
|
||||
| [[How do I get a "real" SSL certificate?]] |
|
||||
| [[Why use self-signed certificates?]] |
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
* Why not supply a disk image download?
|
||||
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.
|
||||
* Is metadata protected?
|
||||
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.
|
||||
* How do I get a domain name?
|
||||
Suppose that you have bought a domain name (rather than using a free subdomain on freedns) and you want to use that instead.
|
||||
|
||||
Remove any existing nameservers for your domain (or select "custom" nameservers), then add:
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
NS1.AFRAID.ORG
|
||||
NS2.AFRAID.ORG
|
||||
NS3.AFRAID.ORG
|
||||
NS4.AFRAID.ORG
|
||||
#+END_SRC
|
||||
|
||||
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".
|
||||
|
||||
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*.
|
||||
|
||||
To route email to one of your freedns domains:
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
editor /etc/mailname
|
||||
#+END_SRC
|
||||
|
||||
Add any extra domains which you own, then save and exit.
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
editor /etc/exim4/update-exim4.conf.conf
|
||||
#+END_SRC
|
||||
|
||||
Within dc_other_hostnames add your extra domain names, separated by a colon ':' character.
|
||||
|
||||
Save and exit, then restart exim.
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
update-exim4.conf.template -r
|
||||
update-exim4.conf
|
||||
service exim4 restart
|
||||
#+END_SRC
|
||||
|
||||
You should now be able to send an email from /postmaster@mynewdomainname/ and it should arrive in your inbox.
|
||||
|
||||
* How do I get a "real" SSL certificate?
|
||||
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).
|
||||
|
||||
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.
|
||||
|
||||
Firstly you should have a web server site configuration ready to go. See [[Setting up a web site]] for details.
|
||||
|
||||
Within StartSSL under the validations wizard validate your domain, which means sending an email to it and confirming a code.
|
||||
|
||||
Now we can generate the certificate request as follows.
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
export HOSTNAME=mydomainname.com
|
||||
openssl genrsa -out /etc/ssl/private/$HOSTNAME.key 2048
|
||||
chown root:ssl-cert /etc/ssl/private/$HOSTNAME.key
|
||||
chmod 440 /etc/ssl/private/$HOSTNAME.key
|
||||
mkdir /etc/ssl/requests
|
||||
#+END_SRC
|
||||
|
||||
Now make a certificate request as follows. You should copy and paste the whole of this, not just line by line.
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
openssl req -new -sha256 -key /etc/ssl/private/$HOSTNAME.key -out /etc/ssl/requests/$HOSTNAME.csr
|
||||
#+END_SRC
|
||||
|
||||
For the email address it's a good idea to use postmaster@mydomainname.
|
||||
|
||||
Use a random 20 character password, and keep a note of it. We'll remove this later.
|
||||
|
||||
View the request with:
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
cat /etc/ssl/requests/$HOSTNAME.csr
|
||||
#+END_SRC
|
||||
|
||||
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.
|
||||
|
||||
Log into your StartSSL account and select *Retrieve Certificate* from the *Tool Box* tab. Copy the text.
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
editor /etc/ssl/certs/$HOSTNAME.crt
|
||||
#+END_SRC
|
||||
|
||||
Paste the public key, then save and exit. Then on the Freedombone.
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
mkdir /etc/ssl/roots
|
||||
mkdir /etc/ssl/chains
|
||||
wget "http://www.startssl.com/certs/ca.pem" --output-document="/etc/ssl/roots/startssl-root.ca"
|
||||
wget "http://www.startssl.com/certs/sub.class1.server.ca.pem" --output-document="/etc/ssl/chains/startssl-sub.class1.server.ca.pem"
|
||||
wget "http://www.startssl.com/certs/sub.class2.server.ca.pem" --output-document="/etc/ssl/chains/startssl-sub.class2.server.ca.pem"
|
||||
wget "http://www.startssl.com/certs/sub.class3.server.ca.pem" --output-document="/etc/ssl/chains/startssl-sub.class3.server.ca.pem"
|
||||
ln -s "/etc/ssl/roots/startssl-root.ca" "/etc/ssl/roots/$HOSTNAME-root.ca"
|
||||
ln -s "/etc/ssl/chains/startssl-sub.class1.server.ca.pem" "/etc/ssl/chains/$HOSTNAME.ca"
|
||||
cp "/etc/ssl/certs/$HOSTNAME.crt" "/etc/ssl/certs/$HOSTNAME.crt+chain+root"
|
||||
test -e "/etc/ssl/chains/$HOSTNAME.ca" && cat "/etc/ssl/chains/$HOSTNAME.ca" >> "/etc/ssl/certs/$HOSTNAME.crt+chain+root"
|
||||
test -e "/etc/ssl/roots/$HOSTNAME-root.ca" && cat "/etc/ssl/roots/$HOSTNAME-root.ca" >> "/etc/ssl/certs/$HOSTNAME.crt+chain+root"
|
||||
#+END_SRC
|
||||
|
||||
To avoid any possibility of the certificates being accidentally overwritten by self-signed ones at a later date you can create backups.
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
mkdir /etc/ssl/backups
|
||||
mkdir /etc/ssl/backups/certs
|
||||
mkdir /etc/ssl/backups/private
|
||||
cp /etc/ssl/certs/$HOSTNAME* /etc/ssl/backups/certs/
|
||||
cp /etc/ssl/private/$HOSTNAME* /etc/ssl/backups/private/
|
||||
chmod -R 400 /etc/ssl/backups/certs/*
|
||||
chmod -R 400 /etc/ssl/backups/private/*
|
||||
#+END_SRC
|
||||
|
||||
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.
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
openssl rsa -in /etc/ssl/private/$HOSTNAME.key -out /etc/ssl/private/$HOSTNAME.new.key
|
||||
cp /etc/ssl/private/$HOSTNAME.new.key /etc/ssl/private/$HOSTNAME.key
|
||||
shred -zu /etc/ssl/private/$HOSTNAME.new.key
|
||||
#+END_SRC
|
||||
|
||||
Create a bundled certificate which joins the certificate and chain file together.
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
cat /etc/ssl/certs/$HOSTNAME.crt /etc/ssl/chains/startssl-sub.class1.server.ca.pem > /etc/ssl/certs/$HOSTNAME.bundle.crt
|
||||
#+END_SRC
|
||||
|
||||
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.
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
mkdir /etc/ssl/mycerts
|
||||
cp /etc/ssl/certs/$HOSTNAME.bundle.crt /etc/ssl/mycerts
|
||||
cat /etc/ssl/mycerts/*.crt > /etc/ssl/freedombone-bundle.crt
|
||||
tar -czvf /etc/ssl/freedombone-certs.tar.gz /etc/ssl/mycerts/*.crt
|
||||
#+END_SRC
|
||||
|
||||
Edit your configuration file.
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
editor /etc/nginx/sites-available/$HOSTNAME
|
||||
#+END_SRC
|
||||
|
||||
Add the following to the section which starts with *listen 443*
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
ssl_certificate /etc/ssl/certs/mydomainname.com.bundle.crt;
|
||||
#+END_SRC
|
||||
|
||||
Save and exit, then restart the web server.
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
service nginx restart
|
||||
#+END_SRC
|
||||
|
||||
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]].
|
||||
|
||||
* Why use self-signed certificates?
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#+BEGIN_CENTER
|
||||
#+ATTR_HTML: :border -1
|
||||
| [[./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]] |
|
||||
| [[./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]] |
|
||||
#+END_CENTER
|
||||
|
||||
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.
|
||||
|
|
|
@ -0,0 +1,516 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title></title>
|
||||
<!-- 2014-10-28 Tue 21:50 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="generator" content="Org-mode" />
|
||||
<meta name="author" content="Bob Mottram" />
|
||||
<meta name="description" content="Turn the Beaglebone Black into a personal communications server"
|
||||
/>
|
||||
<meta name="keywords" content="freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber" />
|
||||
<style type="text/css">
|
||||
<!--/*--><![CDATA[/*><!--*/
|
||||
.title { text-align: center; }
|
||||
.todo { font-family: monospace; color: red; }
|
||||
.done { color: green; }
|
||||
.tag { background-color: #eee; font-family: monospace;
|
||||
padding: 2px; font-size: 80%; font-weight: normal; }
|
||||
.timestamp { color: #bebebe; }
|
||||
.timestamp-kwd { color: #5f9ea0; }
|
||||
.right { margin-left: auto; margin-right: 0px; text-align: right; }
|
||||
.left { margin-left: 0px; margin-right: auto; text-align: left; }
|
||||
.center { margin-left: auto; margin-right: auto; text-align: center; }
|
||||
.underline { text-decoration: underline; }
|
||||
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
|
||||
p.verse { margin-left: 3%; }
|
||||
pre {
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: 3px 3px 3px #eee;
|
||||
padding: 8pt;
|
||||
font-family: monospace;
|
||||
overflow: auto;
|
||||
margin: 1.2em;
|
||||
}
|
||||
pre.src {
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
padding-top: 1.2em;
|
||||
}
|
||||
pre.src:before {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: white;
|
||||
top: -10px;
|
||||
right: 10px;
|
||||
padding: 3px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
pre.src:hover:before { display: inline;}
|
||||
pre.src-sh:before { content: 'sh'; }
|
||||
pre.src-bash:before { content: 'sh'; }
|
||||
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
|
||||
pre.src-R:before { content: 'R'; }
|
||||
pre.src-perl:before { content: 'Perl'; }
|
||||
pre.src-java:before { content: 'Java'; }
|
||||
pre.src-sql:before { content: 'SQL'; }
|
||||
|
||||
table { border-collapse:collapse; }
|
||||
caption.t-above { caption-side: top; }
|
||||
caption.t-bottom { caption-side: bottom; }
|
||||
td, th { vertical-align:top; }
|
||||
th.right { text-align: center; }
|
||||
th.left { text-align: center; }
|
||||
th.center { text-align: center; }
|
||||
td.right { text-align: right; }
|
||||
td.left { text-align: left; }
|
||||
td.center { text-align: center; }
|
||||
dt { font-weight: bold; }
|
||||
.footpara:nth-child(2) { display: inline; }
|
||||
.footpara { display: block; }
|
||||
.footdef { margin-bottom: 1em; }
|
||||
.figure { padding: 1em; }
|
||||
.figure p { text-align: center; }
|
||||
.inlinetask {
|
||||
padding: 10px;
|
||||
border: 2px solid gray;
|
||||
margin: 10px;
|
||||
background: #ffffcc;
|
||||
}
|
||||
#org-div-home-and-up
|
||||
{ text-align: right; font-size: 70%; white-space: nowrap; }
|
||||
textarea { overflow-x: auto; }
|
||||
.linenr { font-size: smaller }
|
||||
.code-highlighted { background-color: #ffff00; }
|
||||
.org-info-js_info-navigation { border-style: none; }
|
||||
#org-info-js_console-label
|
||||
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
|
||||
.org-info-js_search-highlight
|
||||
{ background-color: #ffff00; color: #000000; font-weight: bold; }
|
||||
/*]]>*/-->
|
||||
</style>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="http://sachachua.com/blog/wp-content/themes/sacha-v3/foundation/css/foundation.min.css"></link>
|
||||
<link rel="stylesheet" type="text/css" href="http://sachachua.com/org-export.css"></link>
|
||||
<link rel="stylesheet" type="text/css" href="http://sachachua.com/blog/wp-content/themes/sacha-v3/style.css"></link>
|
||||
<script type="text/javascript">
|
||||
/*
|
||||
@licstart The following is the entire license notice for the
|
||||
JavaScript code in this tag.
|
||||
|
||||
Copyright (C) 2012-2013 Free Software Foundation, Inc.
|
||||
|
||||
The JavaScript code in this tag is free software: you can
|
||||
redistribute it and/or modify it under the terms of the GNU
|
||||
General Public License (GNU GPL) as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option)
|
||||
any later version. The code is distributed WITHOUT ANY WARRANTY;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
||||
|
||||
As additional permission under GNU GPL version 3 section 7, you
|
||||
may distribute non-source (e.g., minimized or compacted) forms of
|
||||
that code without the copy of the GNU GPL normally required by
|
||||
section 4, provided you include this license notice and a URL
|
||||
through which recipients can access the Corresponding Source.
|
||||
|
||||
|
||||
@licend The above is the entire license notice
|
||||
for the JavaScript code in this tag.
|
||||
*/
|
||||
<!--/*--><![CDATA[/*><!--*/
|
||||
function CodeHighlightOn(elem, id)
|
||||
{
|
||||
var target = document.getElementById(id);
|
||||
if(null != target) {
|
||||
elem.cacheClassElem = elem.className;
|
||||
elem.cacheClassTarget = target.className;
|
||||
target.className = "code-highlighted";
|
||||
elem.className = "code-highlighted";
|
||||
}
|
||||
}
|
||||
function CodeHighlightOff(elem, id)
|
||||
{
|
||||
var target = document.getElementById(id);
|
||||
if(elem.cacheClassElem)
|
||||
elem.className = elem.cacheClassElem;
|
||||
if(elem.cacheClassTarget)
|
||||
target.className = elem.cacheClassTarget;
|
||||
}
|
||||
/*]]>*///-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="preamble" class="status">
|
||||
<a name="top" id="top"></a>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1 class="title"></h1>
|
||||
<div class="center">
|
||||
|
||||
<div class="figure">
|
||||
<p><img src="./images/logo.png" alt="logo.png" />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="center">
|
||||
<table border="-1" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
<col class="left" />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="left"><a href="index.html">Home</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="left"><a href="#unnumbered-1">Why not supply a disk image download?</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="left"><a href="#unnumbered-2">Is metadata protected?</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="left"><a href="#unnumbered-3">How do I get a domain name?</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="left"><a href="#unnumbered-4">How do I get a "real" SSL certificate?</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="left"><a href="#unnumbered-5">Why use self-signed certificates?</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-unnumbered-1" class="outline-2">
|
||||
<h2 id="unnumbered-1">Why not supply a disk image download?</h2>
|
||||
<div class="outline-text-2" id="text-unnumbered-1">
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-unnumbered-2" class="outline-2">
|
||||
<h2 id="unnumbered-2">Is metadata protected?</h2>
|
||||
<div class="outline-text-2" id="text-unnumbered-2">
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-unnumbered-3" class="outline-2">
|
||||
<h2 id="unnumbered-3">How do I get a domain name?</h2>
|
||||
<div class="outline-text-2" id="text-unnumbered-3">
|
||||
<p>
|
||||
Suppose that you have bought a domain name (rather than using a free subdomain on freedns) and you want to use that instead.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Remove any existing nameservers for your domain (or select "custom" nameservers), then add:
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<pre class="src src-bash">NS1.AFRAID.ORG
|
||||
NS2.AFRAID.ORG
|
||||
NS3.AFRAID.ORG
|
||||
NS4.AFRAID.ORG
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
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".
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To route email to one of your freedns domains:
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<pre class="src src-bash">editor /etc/mailname
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Add any extra domains which you own, then save and exit.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<pre class="src src-bash">editor /etc/exim4/update-exim4.conf.conf
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Within dc_other_hostnames add your extra domain names, separated by a colon ':' character.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Save and exit, then restart exim.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<pre class="src src-bash">update-exim4.conf.template -r
|
||||
update-exim4.conf
|
||||
service exim4 restart
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
You should now be able to send an email from <i>postmaster@mynewdomainname</i> and it should arrive in your inbox.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-unnumbered-4" class="outline-2">
|
||||
<h2 id="unnumbered-4">How do I get a "real" SSL certificate?</h2>
|
||||
<div class="outline-text-2" id="text-unnumbered-4">
|
||||
<p>
|
||||
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).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Firstly you should have a web server site configuration ready to go. See <i>Setting up a web site</i> for details.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Within StartSSL under the validations wizard validate your domain, which means sending an email to it and confirming a code.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Now we can generate the certificate request as follows.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<pre class="src src-bash"><span class="org-builtin">export</span> <span class="org-variable-name">HOSTNAME</span>=mydomainname.com
|
||||
openssl genrsa -out /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>.key 2048
|
||||
chown root:ssl-cert /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>.key
|
||||
chmod 440 /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>.key
|
||||
mkdir /etc/ssl/requests
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Now make a certificate request as follows. You should copy and paste the whole of this, not just line by line.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<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
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
For the email address it's a good idea to use postmaster@mydomainname.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Use a random 20 character password, and keep a note of it. We'll remove this later.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
View the request with:
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<pre class="src src-bash">cat /etc/ssl/requests/$<span class="org-variable-name">HOSTNAME</span>.csr
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Log into your StartSSL account and select <b>Retrieve Certificate</b> from the <b>Tool Box</b> tab. Copy the text.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<pre class="src src-bash">editor /etc/ssl/certs/$<span class="org-variable-name">HOSTNAME</span>.crt
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Paste the public key, then save and exit. Then on the Freedombone.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<pre class="src src-bash">mkdir /etc/ssl/roots
|
||||
mkdir /etc/ssl/chains
|
||||
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>
|
||||
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>
|
||||
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>
|
||||
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>
|
||||
ln -s <span class="org-string">"/etc/ssl/roots/startssl-root.ca"</span> <span class="org-string">"/etc/ssl/roots/$HOSTNAME-root.ca"</span>
|
||||
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>
|
||||
cp <span class="org-string">"/etc/ssl/certs/$HOSTNAME.crt"</span> <span class="org-string">"/etc/ssl/certs/$HOSTNAME.crt+chain+root"</span>
|
||||
<span class="org-builtin">test</span> -e <span class="org-string">"/etc/ssl/chains/$HOSTNAME.ca"</span> && cat <span class="org-string">"/etc/ssl/chains/$HOSTNAME.ca"</span> >> <span class="org-string">"/etc/ssl/certs/$HOSTNAME.crt+chain+root"</span>
|
||||
<span class="org-builtin">test</span> -e <span class="org-string">"/etc/ssl/roots/$HOSTNAME-root.ca"</span> && cat <span class="org-string">"/etc/ssl/roots/$HOSTNAME-root.ca"</span> >> <span class="org-string">"/etc/ssl/certs/$HOSTNAME.crt+chain+root"</span>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
To avoid any possibility of the certificates being accidentally overwritten by self-signed ones at a later date you can create backups.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<pre class="src src-bash">mkdir /etc/ssl/backups
|
||||
mkdir /etc/ssl/backups/certs
|
||||
mkdir /etc/ssl/backups/private
|
||||
cp /etc/ssl/certs/$<span class="org-variable-name">HOSTNAME</span>* /etc/ssl/backups/certs/
|
||||
cp /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>* /etc/ssl/backups/private/
|
||||
chmod -R 400 /etc/ssl/backups/certs/*
|
||||
chmod -R 400 /etc/ssl/backups/private/*
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<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
|
||||
cp /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>.new.key /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>.key
|
||||
shred -zu /etc/ssl/private/$<span class="org-variable-name">HOSTNAME</span>.new.key
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Create a bundled certificate which joins the certificate and chain file together.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<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 > /etc/ssl/certs/$<span class="org-variable-name">HOSTNAME</span>.bundle.crt
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<pre class="src src-bash">mkdir /etc/ssl/mycerts
|
||||
cp /etc/ssl/certs/$<span class="org-variable-name">HOSTNAME</span>.bundle.crt /etc/ssl/mycerts
|
||||
cat /etc/ssl/mycerts/*.crt > /etc/ssl/freedombone-bundle.crt
|
||||
tar -czvf /etc/ssl/freedombone-certs.tar.gz /etc/ssl/mycerts/*.crt
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Edit your configuration file.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<pre class="src src-bash">editor /etc/nginx/sites-available/$<span class="org-variable-name">HOSTNAME</span>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Add the following to the section which starts with <b>listen 443</b>
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<pre class="src src-bash">ssl_certificate /etc/ssl/certs/mydomainname.com.bundle.crt;
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Save and exit, then restart the web server.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
|
||||
<pre class="src src-bash">service nginx restart
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
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>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-unnumbered-5" class="outline-2">
|
||||
<h2 id="unnumbered-5">Why use self-signed certificates?</h2>
|
||||
<div class="outline-text-2" id="text-unnumbered-5">
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
|
||||
<style type="text/css">
|
||||
.back-to-top {
|
||||
position: fixed;
|
||||
bottom: 2em;
|
||||
right: 0px;
|
||||
text-decoration: none;
|
||||
color: #000000;
|
||||
background-color: rgba(235, 235, 235, 0.80);
|
||||
font-size: 12px;
|
||||
padding: 1em;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.back-to-top:hover {
|
||||
background-color: rgba(135, 135, 135, 0.50);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="back-to-top">
|
||||
<a href="#top">Back to top</a> | <a href="mailto:bob@robotics.uk.to">E-mail me</a>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var offset = 220;
|
||||
var duration = 500;
|
||||
jQuery(window).scroll(function() {
|
||||
if (jQuery(this).scrollTop() > offset) {
|
||||
jQuery('.back-to-top').fadeIn(duration);
|
||||
} else {
|
||||
jQuery('.back-to-top').fadeOut(duration);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -4,7 +4,7 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title></title>
|
||||
<!-- 2014-10-26 Sun 20:48 -->
|
||||
<!-- 2014-10-28 Tue 19:23 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="generator" content="Org-mode" />
|
||||
<meta name="author" content="Bob Mottram" />
|
||||
|
@ -171,6 +171,8 @@ for the JavaScript code in this tag.
|
|||
|
||||
<col class="left" />
|
||||
|
||||
<col class="left" />
|
||||
|
||||
<col class="left" />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
|
@ -180,6 +182,7 @@ for the JavaScript code in this tag.
|
|||
<td class="left"><a href="./usage.html">How to use it</a></td>
|
||||
<td class="left"><a href="./code.html">Code</a></td>
|
||||
<td class="left"><a href="./related.html">Related Projects</a></td>
|
||||
<td class="left"><a href="faq.html">FAQ</a></td>
|
||||
<td class="left"><a href="https://www.gnu.org/licenses/gpl-3.0-standalone.html">License</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in New Issue