Update FAQ for Let's Encrypt

This commit is contained in:
Bob Mottram 2015-12-19 19:26:48 +00:00
parent 59edb3bf89
commit bd222f7dbf
2 changed files with 102 additions and 389 deletions

View File

@ -18,22 +18,23 @@
#+BEGIN_CENTER
#+ATTR_HTML: :border -1
| [[file:index.html][Home]] |
| [[I don't have a static IP address. Can I still install this system?]] |
| [[What is the best hardware to run this system on?]] |
| [[Can I add more users to the system?]] |
| [[How do I remove a user from the system?]] |
| [[How do I reset the tripwire?]] |
| [[Is metadata protected?]] |
| [[How do I create email processing rules?]] |
| [[Why isn't dynamic DNS working?]] |
| [[How do I change my encryption settings?]] |
| [[How do I get a domain name?]] |
| [[How do I get a "real" SSL certificate?]] |
| [[How do I renew a StartSSL certificate?]] |
| [[Why use self-signed certificates?]] |
| [[Why not use the services of $company instead? They took the Seppuku pledge]] |
| [[Why does my email keep getting rejected as spam by Gmail/etc?]] |
| [[file:index.html][Home]] |
| [[I don't have a static IP address. Can I still install this system?]] |
| [[What is the best hardware to run this system on?]] |
| [[Can I add more users to the system?]] |
| [[How do I remove a user from the system?]] |
| [[How do I reset the tripwire?]] |
| [[Is metadata protected?]] |
| [[How do I create email processing rules?]] |
| [[Why isn't dynamic DNS working?]] |
| [[How do I change my encryption settings?]] |
| [[How do I get a domain name?]] |
| [[How do I get a "real" SSL/TLS/HTTPS certificate?]] |
| [[How do I renew a Let's Encrypt certificate?]] |
| [[I tried to renew a Let's Encrypt certificate and it failed. What should I do?]] |
| [[Why use self-signed certificates?]] |
| [[Why not use the services of $company instead? They took the Seppuku pledge]] |
| [[Why does my email keep getting rejected as spam by Gmail/etc?]] |
#+END_CENTER
* I don't have a static IP address. Can I still install this system?
@ -200,160 +201,45 @@ service exim4 restart
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 [[How do I get a domain name?][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.
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://github.com/redmatrix/hubzilla][Hubzilla]].
* How do I renew a StartSSL certificate?
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 *lock icon*, select "*more information*" then "*view certificate*".
Before changing any certificates it's a good idea to make a backup of the existing system. Use /Backup and Restore/ 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.
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 *Menu/Preferences/Advanced/View Certificates*. Make sure the "*Your Cerificates*" tab is selected and click "*import*", then import the StartSSL certificate.
Now go to [[https://startssl.com][startssl.com]] and click on the keys icon on the right hand side to log in. Select the *Control panel* then *Validations Wizard* and choose *Email address validation*. 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.
Once your email is validated then go to *Validations Wizard* and choose *Domain name validation*. Enter your domain name and select *postmaster@yourdomainname*. After a while you should receive a validation email and you can then enter the code.
Log in to the Freedombone, become the root user, then issue the renew command:
* How do I get a "real" SSL/TLS/HTTPS certificate?
If you did the full install or selected the social variant then the system will have tried to obtain a Let's Encrypt certificate automatically during the install process. If this failed for any reason, or if you have created a new site which you need a certificate for then do the following:
#+BEGIN_SRC bash
ssh username@mydomainname -p 2222
su
freedombone-renew-cert -h mydomainname -p startssl
sudo control
#+END_SRC
For the email address it's a good idea to use /postmaster@mydomainname/.
Select *Security settings* then *Create a new Encrypt certificate*.
Use a random 20 character password, and keep a note of it. We'll remove this later.
One thing to be aware of is that Let's Encrypt doesn't support many dynamic DNS subdomains, such as those from freeDNS, so to run Hubzilla and GNU Social you will need to have your own official domains for those. There are many sites from which you can buy cheap domain names, and while this isn't ideal in terms of making you dependent upon another company it's the only option currently.
* How do I renew a Let's Encrypt certificate?
Normally certificates will be automatically renewed once per month, so you don't need to be concerned about it. If anything goes wrong with the automatic renewal then you should receive a warning email.
On the StartSSL site select *Certificates Wizard* then *Web server SSL/TLS Certificate*. 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.
Select *Tool Box* and then *Retrieve Certificate* from the list. Make sure to choose the one with the correct expiration date. Copy the text, then on the Freedombone.
If you need to manually renew a certificate:
#+BEGIN_SRC bash
editor /etc/ssl/certs/mydomainname.new.crt
ssh username@mydomainname -p 2222
sudo control
#+END_SRC
Paste the public key from the StartSSL site. Save and exit. Then run the renew command again:
Select *Security settings* then *Renew Let's Encrypt certificate*.
* I tried to renew a Let's Encrypt certificate and it failed. What should I do?
Most likely it's because Let's Encrypt doesn't support your particular domain or subdomain. Currently free subdomains tend not to work. You'll need to buy a domain name, link it to your dynamic DNS account and then do:
#+BEGIN_SRC bash
freedombone-renew-cert -h mydomainname
ssh username@mydomainname -p 2222
sudo control
#+END_SRC
The new certificate will then be installed.
Select *Security settings* then *Create a new Encrypt certificate*.
* 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.
Almost everywhere on the web you will read that self-signed certificates are worthless. They bring up /scary-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/.
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.
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 actually be trusted. Yes, /Let's Encrypt/ is awesome and very convenient but it's really a small sticking plaster over a much bigger problem. If you don't believe me then do some independent research on the history of certificate authorities and the scandals associated with them, then consider how many of those within your browser (usually under advanced settings) are "trusted". Some of those "trusted" certs are for companies with /incredibly sketchy reputations/, or governments such as that of China. Consider whether you judge the Chinese government to always be truthful about which certificate belongs to which domain, and that it will never abuse such a capability for censorship or political/commercial advantage. Then you'll begin to get an idea of the ramshackle nature of what currently exists.
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.
Despite the hype, 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.
* Why not use the services of $company instead? They took the Seppuku pledge

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2015-12-18 Fri 22:28 -->
<!-- 2015-12-19 Sat 19:26 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title></title>
@ -213,23 +213,27 @@ for the JavaScript code in this tag.
</tr>
<tr>
<td class="org-left"><a href="#orgheadline11">How do I get a "real" SSL certificate?</a></td>
<td class="org-left"><a href="#orgheadline11">How do I get a "real" SSL/TLS/HTTPS certificate?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline12">How do I renew a StartSSL certificate?</a></td>
<td class="org-left"><a href="#orgheadline12">How do I renew a Let's Encrypt certificate?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline13">Why use self-signed certificates?</a></td>
<td class="org-left"><a href="#orgheadline13">I tried to renew a Let's Encrypt certificate and it failed. What should I do?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline14">Why not use the services of $company instead? They took the Seppuku pledge</a></td>
<td class="org-left"><a href="#orgheadline14">Why use self-signed certificates?</a></td>
</tr>
<tr>
<td class="org-left"><a href="#orgheadline15">Why does my email keep getting rejected as spam by Gmail/etc?</a></td>
<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>
@ -552,264 +556,87 @@ You should now be able to send an email from <i>postmaster@mynewdomainname</i> a
</div>
<div id="outline-container-orgheadline11" class="outline-2">
<h2 id="orgheadline11">How do I get a "real" SSL certificate?</h2>
<h2 id="orgheadline11">How do I get a "real" SSL/TLS/HTTPS certificate?</h2>
<div class="outline-text-2" id="text-orgheadline11">
<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="#orgheadline10">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-orgheadline12" class="outline-2">
<h2 id="orgheadline12">How do I renew a StartSSL certificate?</h2>
<div class="outline-text-2" id="text-orgheadline12">
<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:
If you did the full install or selected the social variant then the system will have tried to obtain a Let's Encrypt certificate automatically during the install process. If this failed for any reason, or if you have created a new site which you need a certificate for then do the following:
</p>
<div class="org-src-container">
<pre class="src src-bash">ssh username@mydomainname -p 2222
su
freedombone-renew-cert -h mydomainname -p startssl
sudo control
</pre>
</div>
<p>
For the email address it's a good idea to use <i>postmaster@mydomainname</i>.
Select <b>Security settings</b> then <b>Create a new Encrypt certificate</b>.
</p>
<p>
Use a random 20 character password, and keep a note of it. We'll remove this later.
One thing to be aware of is that Let's Encrypt doesn't support many dynamic DNS subdomains, such as those from freeDNS, so to run Hubzilla and GNU Social you will need to have your own official domains for those. There are many sites from which you can buy cheap domain names, and while this isn't ideal in terms of making you dependent upon another company it's the only option currently.
</p>
</div>
</div>
<div id="outline-container-orgheadline12" class="outline-2">
<h2 id="orgheadline12">How do I renew a Let's Encrypt certificate?</h2>
<div class="outline-text-2" id="text-orgheadline12">
<p>
Normally certificates will be automatically renewed once per month, so you don't need to be concerned about it. If anything goes wrong with the automatic renewal then you should receive a warning email.
</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.
If you need to manually renew a certificate:
</p>
<div class="org-src-container">
<pre class="src src-bash">editor /etc/ssl/certs/mydomainname.new.crt
<pre class="src src-bash">ssh username@mydomainname -p 2222
sudo control
</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.
Select <b>Security settings</b> then <b>Renew Let's Encrypt certificate</b>.
</p>
</div>
</div>
<div id="outline-container-orgheadline13" class="outline-2">
<h2 id="orgheadline13">Why use self-signed certificates?</h2>
<h2 id="orgheadline13">I tried to renew a Let's Encrypt certificate and it failed. What should I do?</h2>
<div class="outline-text-2" id="text-orgheadline13">
<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.
Most likely it's because Let's Encrypt doesn't support your particular domain or subdomain. Currently free subdomains tend not to work. You'll need to buy a domain name, link it to your dynamic DNS account and then do:
</p>
<div class="org-src-container">
<pre class="src src-bash">ssh username@mydomainname -p 2222
sudo control
</pre>
</div>
<p>
Select <b>Security settings</b> then <b>Create a new Encrypt certificate</b>.
</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 <i>scary-scary looking</i> 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>.
</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.
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 actually be trusted. Yes, <i>Let's Encrypt</i> is awesome and very convenient but it's really a small sticking plaster over a much bigger problem. If you don't believe me then do some independent research on the history of certificate authorities and the scandals associated with them, then consider how many of those within your browser (usually under advanced settings) are "trusted". Some of those "trusted" certs are for companies with <i>incredibly sketchy reputations</i>, or governments such as that of China. Consider whether you judge the Chinese government to always be truthful about which certificate belongs to which domain, and that it will never abuse such a capability for censorship or political/commercial advantage. Then you'll begin to get an idea of the ramshackle nature of what currently exists.
</p>
<p>
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>
Despite the hype, 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>
@ -817,17 +644,17 @@ For now a self-signed certificate will probably in most cases protect your commu
</p>
</div>
</div>
<div id="outline-container-orgheadline14" class="outline-2">
<h2 id="orgheadline14">Why not use the services of $company instead? They took the Seppuku pledge</h2>
<div class="outline-text-2" id="text-orgheadline14">
<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-orgheadline15" class="outline-2">
<h2 id="orgheadline15">Why does my email keep getting rejected as spam by Gmail/etc?</h2>
<div class="outline-text-2" id="text-orgheadline15">
<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>