|
@@ -22,7 +22,9 @@
|
|
|
</style>
|
|
|
</head>
|
|
|
<body><div id="readme" class="container"><article class="markdown-body entry-content"><h2 id="installation-des-certificats-letsencrypt">Installation des certificats letsencrypt</h2>
|
|
|
-<pre><code class="language-shell">root@aijan:/home/ericadmin/bin# apt install certbot python-certbot-apache
|
|
|
+<h3 id="installation-des-programmes">Installation des programmes</h3>
|
|
|
+<p>Il existe plusieurs clients <strong>letsencrypt</strong> pour la gestion des certificats. Nous utiliserons <strong>certbot</strong>, le client officiel de <strong>letsencrypt</strong>.</p>
|
|
|
+<pre><code class="language-shell">root@atom:/home/ericadmin/bin# apt install certbot python-certbot-apache
|
|
|
Lecture des listes de paquets... Fait
|
|
|
Construction de l'arbre des dépendances
|
|
|
Lecture des informations d'état... Fait
|
|
@@ -33,26 +35,21 @@ The following additional packages will be installed:
|
|
|
python-zope.hookable python-zope.interface
|
|
|
|
|
|
etc...</code></pre>
|
|
|
-<p>Bien, les programmes sont installés. Nous allons créer des certificats pour les zones suivantes, après avoir créé les hôtes virtuels apache.</p>
|
|
|
-<blockquote>
|
|
|
-<p>yojik.net</p>
|
|
|
-</blockquote>
|
|
|
-<blockquote>
|
|
|
-<p><a href="http://www.yojik.net">www.yojik.net</a></p>
|
|
|
-</blockquote>
|
|
|
-<blockquote>
|
|
|
-<p>atom.yojik.net</p>
|
|
|
-</blockquote>
|
|
|
-<p>Les 2 premiers concernent le site web, le dernier, le serveur de mail. Nous allons d'abord rajouter les noms manquants dans le fichier de zone DNS; pour l'instant, nous n'avons déclaré qu'un seul nom: aijan.yojik.net. Rajoutons les suivants avec des enregistrements CNAME. Ne pas oublier d'incrémenter le compteur situé dans le fichier de zone DNS après chaque modification.</p>
|
|
|
+<h3 id="cr-ation-des-certificats-pour-nos-domaines">Création des certificats pour nos domaines</h3>
|
|
|
+<p>Bien, les programmes sont installés. Nous allons créer des certificats pour les domaines suivantes, après avoir créé les hôtes virtuels apache.</p>
|
|
|
+<ul>
|
|
|
+<li>yojik.net</li>
|
|
|
+<li><a href="http://www.yojik.net">www.yojik.net</a></li>
|
|
|
+<li>atom.yojik.net</li>
|
|
|
+</ul>
|
|
|
+<p>Les 2 premiers concernent le site web, le dernier, le serveur de mail. Nous allons d'abord rajouter les noms manquants dans le fichier de zone DNS; pour l'instant, nous n'avons déclaré qu'un seul nom: atom.yojik.net. Rajoutons les suivants avec des enregistrements CNAME. Ne pas oublier d'incrémenter le compteur situé dans le fichier de zone DNS après chaque modification.</p>
|
|
|
+<p>Lors de l'installation de notre webmail, nous rajouterons le domaine correspondant.</p>
|
|
|
<p>Nous ajoutons ici la référence du serveur web, avec un enregistrement CNAME: <a href="http://www.yojik.eu">www.yojik.eu</a></p>
|
|
|
-<pre><code class="language-shell">www IN CNAME aijan.yojik.net.</code></pre>
|
|
|
+<pre><code class="language-shell">www IN CNAME atom.yojik.net.</code></pre>
|
|
|
<p>Relecture des fichiers de configuration par bind:</p>
|
|
|
-<pre><code class="language-shell">root@aijan:/home/ericadmin# service bind9 reload</code></pre>
|
|
|
+<pre><code class="language-shell">root@atom:/home/ericadmin# service bind9 reload</code></pre>
|
|
|
<h3 id="lancement-du-programme-certbot">lancement du programme certbot</h3>
|
|
|
-<blockquote>
|
|
|
-<p>certbot --apache</p>
|
|
|
-</blockquote>
|
|
|
-<pre><code>root@aijan:/home/ericadmin# certbot --apache
|
|
|
+<pre><code class="language-shell">root@atom:/home/ericadmin# certbot --apache
|
|
|
Saving debug log to /var/log/letsencrypt/letsencrypt.log
|
|
|
|
|
|
Which names would you like to activate HTTPS for?
|
|
@@ -65,11 +62,19 @@ blank to select all options shown (Enter 'c' to cancel):1 2
|
|
|
Obtaining a new certificate
|
|
|
Performing the following challenges:
|
|
|
Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA.
|
|
|
-Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA.
|
|
|
-</code></pre><p>Bon, il y a un problème ... après recherche sur le web, il se trouve que le programme certbot de Debian/stretch n'est pas à jour (modification due à un problème de sécurité.) (lien: <a href="https://community.letsencrypt.org/t/solution-client-with-the-currently-selected-authenticator-does-not-support-any-combination-of-challenges-that-will-satisfy-the-ca/49983">https://community.letsencrypt.org/t/solution-client-with-the-currently-selected-authenticator-does-not-support-any-combination-of-challenges-that-will-satisfy-the-ca/49983</a>)</p>
|
|
|
-<p>Il nous faut ajouter dans /etc/sources.list le dépot <strong>backports</strong> pour obtenir le fichier qui suit:
|
|
|
-(lien: <a href="https://backports.debian.org/Instructions/">https://backports.debian.org/Instructions/</a>)</p>
|
|
|
-<pre><code>root@aijan:/home/ericadmin# cat /etc/apt/sources.list
|
|
|
+Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA.</code></pre>
|
|
|
+<p>Bon, il y a un problème ... après recherche sur le web, il se trouve que le programme certbot de Debian/stretch n'est pas à jour (modification due à un problème de sécurité.)</p>
|
|
|
+<ul>
|
|
|
+<li><p>Voici le lien:</p>
|
|
|
+<p> <a href="https://community.letsencrypt.org/t/solution-client-with-the-currently-selected-authenticator-does-not-support-any-combination-of-challenges-that-will-satisfy-the-ca/49983">certbot sur Debian/Stretch problem and solution</a></p>
|
|
|
+</li>
|
|
|
+<li><p>Ajout des backports dans la liste des dépots:</p>
|
|
|
+<p> Il nous faut ajouter dans /etc/sources.list le dépot <strong>backports</strong> pour obtenir le fichier qui suit:
|
|
|
+ Lien: <a href="https://backports.debian.org/Instructions/">Installation des backports</a></p>
|
|
|
+<p> Voici le contenu du fichier <em>etc/apt/sources.list</em></p>
|
|
|
+</li>
|
|
|
+</ul>
|
|
|
+<pre><code class="language-shell">root@atom:/home/ericadmin# cat /etc/apt/sources.list
|
|
|
#
|
|
|
|
|
|
# deb cdrom:[Debian GNU/Linux 9.3.0 _Stretch_ - Official amd64 NETINST 20171209-12:10]/ stretch main
|
|
@@ -86,20 +91,15 @@ deb-src http://security.debian.org/debian-security stretch/updates main contrib
|
|
|
deb http://deb.debian.org/debian/ stretch-updates main contrib non-free
|
|
|
deb-src http://deb.debian.org/debian/ stretch-updates main contrib non-free
|
|
|
|
|
|
-deb http://ftp.debian.org/debian stretch-backports main contrib non-free
|
|
|
-
|
|
|
-</code></pre><p>Notez la dernière ligne rajoutée au fichier. Ensuite,entrez les commandes suivantes:</p>
|
|
|
-<blockquote>
|
|
|
-<p>apt update
|
|
|
-apt-get install python-certbot-apache -t stretch-backports</p>
|
|
|
-</blockquote>
|
|
|
+deb http://ftp.debian.org/debian stretch-backports main contrib non-free</code></pre>
|
|
|
+<p>Notez la dernière ligne rajoutée au fichier. Ensuite,entrez les commandes suivantes:</p>
|
|
|
+<pre><code class="language-shell">apt update
|
|
|
+apt-get install python-certbot-apache -t stretch-backports</code></pre>
|
|
|
<p>Un grand nombre de paquets vont être installés ...</p>
|
|
|
<p>On relance le programme certbot:</p>
|
|
|
-<blockquote>
|
|
|
-<p>certbot --apache</p>
|
|
|
-</blockquote>
|
|
|
+<pre><code class="language-shell">certbot --apache</code></pre>
|
|
|
<p>Cette fois-ci, ça fonctionne.</p>
|
|
|
-<pre><code>root@aijan:/home/ericadmin# certbot --apache
|
|
|
+<pre><code class="language-shell">root@atom:/home/ericadmin# certbot --apache
|
|
|
Saving debug log to /var/log/letsencrypt/letsencrypt.log
|
|
|
Plugins selected: Authenticator apache, Installer apache
|
|
|
|
|
@@ -150,13 +150,14 @@ IMPORTANT NOTES:
|
|
|
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
|
|
|
Donating to EFF: https://eff.org/donate-le
|
|
|
|
|
|
-root@aijan:/home/ericadmin#
|
|
|
-</code></pre><p>On retape les mêmes commandes pour générer les certificats pour le domaine <strong><a href="http://www.yojik.net">www.yojik.net</a></strong>.</p>
|
|
|
+root@atom:/home/ericadmin#</code></pre>
|
|
|
+<p>On retape les mêmes commandes pour générer les certificats pour le domaine <strong><a href="http://www.yojik.net">www.yojik.net</a></strong>.</p>
|
|
|
<p>Testez votre configuration comme indiqué ci-dessus. Vous devez obtenir une note <strong>A</strong>.</p>
|
|
|
<p>Il nous faut maintenant créer un certificat pour notre serveur mail:</p>
|
|
|
-<p><code></code>root@aijan:/home/ericadmin# certbot certonly -d aijan.yojik.net
|
|
|
-Saving debug log to /var/log/letsencrypt/letsencrypt.log</p>
|
|
|
-<p>How would you like to authenticate with the ACME CA?
|
|
|
+<pre><code class="language-shell">root@atom:/home/ericadmin# certbot certonly -d atom.yojik.net
|
|
|
+Saving debug log to /var/log/letsencrypt/letsencrypt.log
|
|
|
+
|
|
|
+How would you like to authenticate with the ACME CA?
|
|
|
-
|
|
|
1: Apache Web Server plugin - Beta (apache)
|
|
|
2: Spin up a temporary webserver (standalone)
|
|
@@ -166,28 +167,26 @@ Select the appropriate number [1-3] then [enter] (press 'c' to cancel)
|
|
|
Plugins selected: Authenticator apache, Installer None
|
|
|
Obtaining a new certificate
|
|
|
Performing the following challenges:
|
|
|
-http-01 challenge for aijan.yojik.net
|
|
|
+http-01 challenge for atom.yojik.net
|
|
|
Waiting for verification...
|
|
|
-Cleaning up challenges</p>
|
|
|
-<p>IMPORTANT NOTES:</p>
|
|
|
-<ul>
|
|
|
-<li>Congratulations! Your certificate and chain have been saved at:
|
|
|
-/etc/letsencrypt/live/aijan.yojik.net/fullchain.pem
|
|
|
-Your key file has been saved at:
|
|
|
-/etc/letsencrypt/live/aijan.yojik.net/privkey.pem
|
|
|
-Your cert will expire on 2018-08-19. To obtain a new or tweaked
|
|
|
-version of this certificate in the future, simply run certbot
|
|
|
-again. To non-interactively renew <em>all</em> of your certificates, run
|
|
|
-"certbot renew"</li>
|
|
|
-<li><p>If you like Certbot, please consider supporting our work by:</p>
|
|
|
-<p>Donating to ISRG / Let's Encrypt: <a href="https://letsencrypt.org/donate">https://letsencrypt.org/donate</a>
|
|
|
-Donating to EFF: <a href="https://eff.org/donate-le">https://eff.org/donate-le</a></p>
|
|
|
-</li>
|
|
|
-</ul>
|
|
|
-<p>root@aijan:/home/ericadmin#
|
|
|
-`</p>
|
|
|
-<p><code>`</code></p>
|
|
|
-<p>Voilà, le certificat est créé.</p>
|
|
|
+Cleaning up challenges
|
|
|
+
|
|
|
+IMPORTANT NOTES:
|
|
|
+ - Congratulations! Your certificate and chain have been saved at:
|
|
|
+ /etc/letsencrypt/live/atom.yojik.net/fullchain.pem
|
|
|
+ Your key file has been saved at:
|
|
|
+ /etc/letsencrypt/live/atom.yojik.net/privkey.pem
|
|
|
+ Your cert will expire on 2018-08-19. To obtain a new or tweaked
|
|
|
+ version of this certificate in the future, simply run certbot
|
|
|
+ again. To non-interactively renew *all* of your certificates, run
|
|
|
+ "certbot renew"
|
|
|
+ - If you like Certbot, please consider supporting our work by:
|
|
|
+
|
|
|
+ Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
|
|
|
+ Donating to EFF: https://eff.org/donate-le
|
|
|
+
|
|
|
+root@atom:/home/ericadmin#</code></pre>
|
|
|
+<p>Voilà, nos certificats sont créés. Lors de la configuration, notez que j'ai demandé une redirection automatique vers la version en <strong>https</strong>.</p>
|
|
|
</article></div><div style="background-color: #b4b2b2;width: 50px;height:50px;line-height: 50px;text-align: center;position: fixed;bottom: 10px;right: 10px;padding-top:5px;" onclick="document.documentElement.scrollTop = document.body.scrollTop =0;">
|
|
|
<svg t="1533629773982" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1035" xlink="http://www.w3.org/1999/xlink" width="40" height="40"><defs><style type="text/css">@font-face { font-family: uc-nexus-iconfont; src: url("chrome-extension://pogijhnlcfmcppgimcaccdkmbedjkmhi/res/font_9qmmi8b8jsxxbt9.woff") format("woff"), url("chrome-extension://pogijhnlcfmcppgimcaccdkmbedjkmhi/res/font_9qmmi8b8jsxxbt9.ttf") format("truetype"); }
|
|
|
</style></defs><path d="M536.255427 195.182354c-7.804756-7.804756-17.966187-11.615549-28.311813-11.615549-9.43693 0-18.874883 3.449565-26.496467 10.163477-2.360767 1.452071-4.356214 3.267417-6.352685 5.262864L218.47792 455.611735c-15.607466 15.60542-15.607466 40.834011 0 56.43943 15.607466 15.607466 41.558511 15.607466 57.167001 0l193.46013-192.733583 0 600.526219c0 22.1423 17.787108 39.927361 39.927361 39.927361 22.140253 0 39.927361-17.785062 39.927361-39.927361L548.959773 319.317583 737.15704 508.422522c15.607466 15.607466 40.469714 15.607466 56.078203 0 15.607466-15.607466 15.425318-40.834011-0.182149-56.441477L536.255427 195.182354 536.255427 195.182354z" p-id="1036" fill="#333"/><path d="M101.784174 143.097092l816.674071 0c22.140253 0 39.925315-17.785062 39.925315-39.927361 0-22.140253-17.784038-39.925315-39.925315-39.925315L101.784174 63.244416c-22.140253 0-39.927361 17.785062-39.927361 39.925315C61.856813 125.31203 79.643921 143.097092 101.784174 143.097092L101.784174 143.097092z" p-id="1037" fill="#333"/></svg>
|