freedomboneeee/website/EN/faq.html

898 lines
37 KiB
HTML

<?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>
<!-- 2015-11-03 Tue 20:01 -->
<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, hubzilla, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
.title { text-align: center;
margin-bottom: .2em; }
.subtitle { text-align: center;
font-size: medium;
font-weight: bold;
margin-top:0; }
.todo { font-family: monospace; color: red; }
.done { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-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.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-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">
<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="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left"><a href="index.html">Home</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline1">Why not supply a disk image download?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline2">I don't have a static IP address. Can I still install this system?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline3">What is the best hardware to run this system on?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline4">Can I add more users to the system?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline5">How do I remove a user from the system?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline6">How do I reset the tripwire?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline7">Is metadata protected?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline8">How do I create email processing rules?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline9">Why isn't dynamic DNS working?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline10">How do I change my encryption settings?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline11">How do I get a domain name?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline12">How do I get a "real" SSL certificate?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline13">How do I renew a StartSSL certificate?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline14">Why use self-signed certificates?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline15">Why not use the services of $company instead? They took the Seppuku pledge</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline16">Why does my email keep getting rejected as spam by Gmail/etc?</a></td>
</tr>
</tbody>
</table>
</div>
<div id="outline-container-orgheadline1" class="outline-2">
<h2 id="orgheadline1">Why not supply a disk image download?</h2>
<div class="outline-text-2" id="text-orgheadline1">
<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 <b>freedombone</b> command is a lot more transparent, since it's really just a bash script. You can check the script 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-orgheadline2" class="outline-2">
<h2 id="orgheadline2">I don't have a static IP address. Can I still install this system?</h2>
<div class="outline-text-2" id="text-orgheadline2">
<p>
Yes. The minimum requirements are to have some hardware that you can install Debian onto and also that you have administrator access to your internet router so that you can forward ports to the system which has Freedombone installed.
</p>
<p>
The lack of a static IP address can be worked around by using a dynamic DNS service. Freedombone uses <a href="http://troglobit.com/inadyn.html">inadyn</a>, which supports a variety of dynamic DNS providers.
</p>
</div>
</div>
<div id="outline-container-orgheadline3" class="outline-2">
<h2 id="orgheadline3">What is the best hardware to run this system on?</h2>
<div class="outline-text-2" id="text-orgheadline3">
<p>
It was originally designed to run on the Beaglebone Black, but that should be regarded as the most minimal system, because it's single core and has by today's standards a small amount of memory. Obviously the more powerful the hardware is the faster things like web pages (blog, social networking, etc) will be served but the more electricity such a system will require if you're running it 24/7. A good compromise between performance and energy consumption is something like an old netbook. The battery of an old netbook or laptop even gives you <a href="https://en.wikipedia.org/wiki/Uninterruptible_power_supply">UPS capability</a> to keep the system going during brief power outages or cable re-arrangements, and that means using full disk encryption on the server also becomes more practical.
</p>
<p>
<i>Out of fashion</i> but still working computer hardware tends to be cheap and readily available, yet still good for providing internet services.
</p>
</div>
</div>
<div id="outline-container-orgheadline4" class="outline-2">
<h2 id="orgheadline4">Can I add more users to the system?</h2>
<div class="outline-text-2" id="text-orgheadline4">
<p>
Yes. Freedombone can support a small number of users, for a "<i>friends and family</i>" type of home installation. This gives them access to an email account, XMPP, SIP phone and the blog (depending on whether the variant which you installed includes those).
</p>
<div class="org-src-container">
<pre class="src src-bash">ssh username@mydomainname -p 2222
su
control
</pre>
</div>
<p>
Select <i>Manage Users</i> and then <i>Add a user</i>. You will be prompted for a username and you can also optionally provide their ssh public key.
</p>
<p>
Something to consider when having more than a single user on the system is the security situation. The original administrator user will have access to all of the data for other users (including their encryption keys), so if you do add extra users they need to have <b>complete trust</b> in the administrator.
</p>
<p>
Another point is that Freedombone installations are not intended to support many users (maybe ten at most). Large numbers of users may make the system unstable, and the more users you have on one system the more it becomes a single point of failure and also perhaps a honeypot from the standpoint of adversaries. Think of what happened with Lavabit and the moral dilemma which an administrator can be faced with (comply with threats and betray the trust of your users or don't comply and suffer other consequences). Ideally, you never want to put yourself into a situation where you can be forced to betray others.
</p>
</div>
</div>
<div id="outline-container-orgheadline5" class="outline-2">
<h2 id="orgheadline5">How do I remove a user from the system?</h2>
<div class="outline-text-2" id="text-orgheadline5">
<p>
To remove a user:
</p>
<div class="org-src-container">
<pre class="src src-bash">ssh username@mydomainname -p 2222
su
control
</pre>
</div>
<p>
Select <i>Manage Users</i> and then <i>Delete a user</i>. Note that this will delete all of that user's files and email.
</p>
</div>
</div>
<div id="outline-container-orgheadline6" class="outline-2">
<h2 id="orgheadline6">How do I reset the tripwire?</h2>
<div class="outline-text-2" id="text-orgheadline6">
<p>
The tripwire will be automatically reset once per week. If you want to reset it earlier then do the following:
</p>
<div class="org-src-container">
<pre class="src src-bash">ssh username@mydomain -p 2222
su
control
</pre>
</div>
<p>
Select "reset tripwire" using cursors and space bar then enter.
</p>
</div>
</div>
<div id="outline-container-orgheadline7" class="outline-2">
<h2 id="orgheadline7">Is metadata protected?</h2>
<div class="outline-text-2" id="text-orgheadline7">
<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 on its own won't help. You may be able to use Tor Messenger to protect the metadata of XMPP chat communications to some extent.
</p>
</div>
</div>
<div id="outline-container-orgheadline8" class="outline-2">
<h2 id="orgheadline8">How do I create email processing rules?</h2>
<div class="outline-text-2" id="text-orgheadline8">
<div class="org-src-container">
<pre class="src src-bash">ssh username@domainname -p 2222
su
control
</pre>
</div>
<p>
Select <i>Email Filtering Rules</i> then you can add rules to be applied to incoming email addresses or mailing lists. If you prefer to do things directly on the command line, without the control panel, then the following commands are available:
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left">freedombone-addlist</td>
<td class="org-left">Adds a mailing list</td>
</tr>
<tr>
<td class="org-left">freedombone-rmlist</td>
<td class="org-left">Removes a mailing list</td>
</tr>
<tr>
<td class="org-left">freedombone-addemail</td>
<td class="org-left">Transfers emails from an address to a given folder</td>
</tr>
<tr>
<td class="org-left">freedombone-rmemail</td>
<td class="org-left">Removes an email transferal rule</td>
</tr>
<tr>
<td class="org-left">freedombone-ignore</td>
<td class="org-left">Ignores email from an address or with a subject line containing text</td>
</tr>
<tr>
<td class="org-left">freedombone-unignore</td>
<td class="org-left">Removes an ignore rule</td>
</tr>
</tbody>
</table>
<p>
Spamassassin is also available and within Mutt you can use the S (shift+s) key to mark an email as spam or the H (shift+h) key to mark an email as not being spam. So by using a combination of email rules and spam filtering you should be able to avoid any spammers or trolls.
</p>
</div>
</div>
<div id="outline-container-orgheadline9" class="outline-2">
<h2 id="orgheadline9">Why isn't dynamic DNS working?</h2>
<div class="outline-text-2" id="text-orgheadline9">
<p>
If you run the command:
</p>
<div class="org-src-container">
<pre class="src src-bash">service inadyn status
</pre>
</div>
<p>
And see some error related to checking for changes in the IP address then you can try other external IP services. Edit <b>/etc/inadyn.conf</b> and change the domain for the <b>checkip-url</b> parameter. Possible sites are:
</p>
<div class="org-src-container">
<pre class="src src-bash">https://check.torproject.org/
https://www.whatsmydns.net/whats-my-ip-address.html
https://www.privateinternetaccess.com/pages/whats-my-ip/
http://checkip.two-dns.de
http://ip.dnsexit.com
http://ifconfig.me/ip
http://ipecho.net/plain
http://checkip.dyndns.org/plain
http://ipogre.com/linux.php
http://whatismyipaddress.com/
http://ip.my-proxy.com/
http://websiteipaddress.com/WhatIsMyIp
http://getmyipaddress.org/
http://www.my-ip-address.net/
http://myexternalip.com/raw
http://www.canyouseeme.org/
http://www.trackip.net/
http://icanhazip.com/
http://www.iplocation.net/
http://www.howtofindmyipaddress.com/
http://www.ipchicken.com/
http://whatsmyip.net/
http://www.ip-adress.com/
http://checkmyip.com/
http://www.tracemyip.org/
http://checkmyip.net/
http://www.lawrencegoetz.com/programs/ipinfo/
http://www.findmyip.co/
http://ip-lookup.net/
http://www.dslreports.com/whois
http://www.mon-ip.com/en/my-ip/
http://www.myip.ru
http://ipgoat.com/
http://www.myipnumber.com/my-ip-address.asp
http://www.whatsmyipaddress.net/
http://formyip.com/
http://www.displaymyip.com/
http://www.bobborst.com/tools/whatsmyip/
http://www.geoiptool.com/
http://checkip.dyndns.com/
http://myexternalip.com/
http://www.ip-adress.eu/
http://www.infosniper.net/
http://wtfismyip.com/
http://ipinfo.io/
http://httpbin.org/ip
</pre>
</div>
</div>
</div>
<div id="outline-container-orgheadline10" class="outline-2">
<h2 id="orgheadline10">How do I change my encryption settings?</h2>
<div class="outline-text-2" id="text-orgheadline10">
<p>
Suppose that some new encryption vulnerability has been announced and that you need to change your encryption settings. Maybe an algorithm thought to be secure is now no longer so and you need to remove it. You can change your settings by doing the following:
</p>
<div class="org-src-container">
<pre class="src src-bash">ssh myusername@mydomain -p 2222
su
control
</pre>
</div>
<p>
Then select <i>Security Settings</i>. You will then be able to edit the crypto settings for all of the installed applications. <b>Be very careful when editing</b>, since any mistake could make your system less secure rather than more.
</p>
</div>
</div>
<div id="outline-container-orgheadline11" class="outline-2">
<h2 id="orgheadline11">How do I get a domain name?</h2>
<div class="outline-text-2" id="text-orgheadline11">
<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-orgheadline12" class="outline-2">
<h2 id="orgheadline12">How do I get a "real" SSL certificate?</h2>
<div class="outline-text-2" id="text-orgheadline12">
<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 <a href="#orgheadline11">Using your own domain</a> 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>
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> &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>
<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>
</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 &gt; /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 &gt; /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://github.com/redmatrix/hubzilla">Hubzilla</a>.
</p>
</div>
</div>
<div id="outline-container-orgheadline13" class="outline-2">
<h2 id="orgheadline13">How do I renew a StartSSL certificate?</h2>
<div class="outline-text-2" id="text-orgheadline13">
<p>
The StartSSL certificates last for a year. You can check the expiry date of your current certificate/s by going to your site and if you're using Firefox then click on the <b>lock icon</b>, select "<b>more information</b>" then "<b>view certificate</b>".
</p>
<p>
Before changing any certificates it's a good idea to make a backup of the existing system. Use <i>Backup and Restore</i> from the control panel to make a backup of the system to a USB drive. Backing up may take a while, but it ensures that if anything goes wrong and you mess up the certificates then there is a way to restore the previous ones.
</p>
<p>
Make sure that you have the StartSSL certificate which was created when you initially made an account. You did save it somewhere safe, didn't you? If it's not installed into your browser then in Firefox go to <b>Menu/Preferences/Advanced/View Certificates</b>. Make sure the "<b>Your Cerificates</b>" tab is selected and click "<b>import</b>", then import the StartSSL certificate.
</p>
<p>
Now go to <a href="https://startssl.com/">startssl.com</a> and click on the keys icon on the right hand side to log in. Select the <b>Control panel</b> then <b>Validations Wizard</b> and choose <b>Email address validation</b>. Enter your email address, then wait for the validation email to show up in your inbox. It will contain a code when you can then enter.
</p>
<p>
Once your email is validated then go to <b>Validations Wizard</b> and choose <b>Domain name validation</b>. Enter your domain name and select <b>postmaster@yourdomainname</b>. After a while you should receive a validation email and you can then enter the code.
</p>
<p>
Log in to the Freedombone, become the root user, then issue the renew command:
</p>
<div class="org-src-container">
<pre class="src src-bash">ssh username@mydomainname -p 2222
su
freedombone-renew-cert -h mydomainname -p startssl
</pre>
</div>
<p>
For the email address it's a good idea to use <i>postmaster@mydomainname</i>.
</p>
<p>
Use a random 20 character password, and keep a note of it. We'll remove this later.
</p>
<p>
On the StartSSL site select <b>Certificates Wizard</b> then <b>Web server SSL/TLS Certificate</b>. You can then click on "skip" and then copy and paste the certificate request into the text entry box. You may now need to wait a few hours for a confirmation email indicating that the new certificate was created.
</p>
<p>
Select <b>Tool Box</b> and then <b>Retrieve Certificate</b> from the list. Make sure to choose the one with the correct expiration date. Copy the text, then on the Freedombone.
</p>
<div class="org-src-container">
<pre class="src src-bash">editor /etc/ssl/certs/mydomainname.new.crt
</pre>
</div>
<p>
Paste the public key from the StartSSL site. Save and exit. Then run the renew command again:
</p>
<div class="org-src-container">
<pre class="src src-bash">freedombone-renew-cert -h mydomainname
</pre>
</div>
<p>
The new certificate will then be installed.
</p>
</div>
</div>
<div id="outline-container-orgheadline14" class="outline-2">
<h2 id="orgheadline14">Why use self-signed certificates?</h2>
<div class="outline-text-2" id="text-orgheadline14">
<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> 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.
</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 arriving.
</p>
<p>
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.
</p>
</div>
</div>
<div id="outline-container-orgheadline15" class="outline-2">
<h2 id="orgheadline15">Why not use the services of $company instead? They took the Seppuku pledge</h2>
<div class="outline-text-2" id="text-orgheadline15">
<p>
<a href="http://seppuku.cryptostorm.org/">That pledge</a> is utterly worthless. Years ago people trusted Google in the same sort of way, because they promised not be be evil and because a lot of the engineers working for them seemed like honest types who were "<i>on our side</i>". Post-<a href="https://en.wikipedia.org/wiki/Nymwars">nymwars</a> and post-<a href="https://en.wikipedia.org/wiki/PRISM_(surveillance_program)">PRISM</a> we know exactly how much Google cared about the privacy and security of its users. But Google is only one particular example. In general don't trust pledges made by companies, even if the people running them seem really sincere.
</p>
</div>
</div>
<div id="outline-container-orgheadline16" class="outline-2">
<h2 id="orgheadline16">Why does my email keep getting rejected as spam by Gmail/etc?</h2>
<div class="outline-text-2" id="text-orgheadline16">
<p>
Welcome to the world of email. Email is really the archetypal decentralized service, developed during the early days of the internet. In principle anyone can run an email server, and that's exactly what you're doing with Freedombone. Email is very useful, but it has a big problem, and that's that the protocols are totally insecure. That made it easy for spammers to do their thing, and in response highly elaborate spam filtering and blocking systems were developed. Chances are that your emails are being blocked in this way. Sometimes the blocking is so indisciminate that entire countries are excluded. What can you do about it? Unless you control the block list at the receiving end probably you can't do anything. There is zero accountability for such blocking, and you can't just contact someone and say "hey, I'm not a spammer". This system works well for the big internet companies because it effectively centralises email to a few well-known brand names and keeps any independent servers out.
</p>
<p>
So the situation with email presently is pretty bad, and there's a clear selection pressure against decentralization and towards only a few companies controlling all email services. Longer term the solution is to have more secure protocols which make spamming hard or expensive. Bitmessage is one such system. As an immediate practical workaround you could try buying a domain name and then linking it to your dynamic DNS account (freeDNS, etc) in the hope that the blocking is against dynamic DNS domain names, but there is no guarantee that will work and often blocking may be based upon IP address ranges about which there is little you can do.
</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>