
J'ai besoin d'un petit coup de pousse pour la finition de HTTPS pour : dezix.fr
J'ai mis en place : certbot + systemd + stunnel + micro-httpd
Si vous avez testé le lien dezix.fr qui précède,
je suppose que votre navigateur vous aura informé que le certificat du site n'est pas (re)connu ou un truc dans le genre.
Comme c'est ma 1ère expérience de configuration TLS et de Let's Encrypt,
j'ai d'abord utilisé : certbot certonly --dry-run --manual
histoire de voir ce qui allait se passer.
j'ai poursuivi avec : certbot certonly --test-cert --manual
apparemment tout a bien fonctionné et j'ai obtenu :
Code : Tout sélectionner
ls -l /etc/letsencrypt/live/dezix.fr/
-rw-r----- 1 root root 692 Oct 17 21:09 README
lrwxrwxrwx 1 root root 32 Oct 17 21:09 cert.pem -> ../../archive/dezix.fr/cert1.pem
lrwxrwxrwx 1 root root 33 Oct 17 21:09 chain.pem -> ../../archive/dezix.fr/chain1.pem
lrwxrwxrwx 1 root root 37 Oct 17 21:09 fullchain.pem -> ../../archive/dezix.fr/fullchain1.pem
lrwxrwxrwx 1 root root 35 Oct 17 21:09 privkey.pem -> ../../archive/dezix.fr/privkey1.pem
ls -l /etc/letsencrypt/archive/dezix.fr
-rw-r----- 1 root root 1529 Oct 17 21:09 cert1.pem
-rw-r----- 1 root root 2770 Oct 17 21:09 chain1.pem
-rw-r----- 1 root root 4299 Oct 17 21:09 fullchain1.pem
-rw------- 1 root root 306 Oct 17 21:09 privkey1.pem
mais j'ai fini par avoir :
Code : Tout sélectionner
# systemctl status stunnel@micro-httpd
● stunnel@micro-httpd.service - TLS tunnel for network daemons - per-config-file service
Loaded: loaded (/lib/systemd/system/stunnel@.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Thu 2022-10-20 08:55:06 UTC; 5s ago
Docs: man:stunnel4(8)
Process: 96921 ExecStart=/usr/bin/stunnel4 /etc/stunnel/micro-httpd.conf (code=exited, status=0/SUCCESS)
Main PID: 96921 (code=exited, status=0/SUCCESS)
CPU: 34ms
Oct 20 08:55:06 server1.dezix.fr stunnel[96921]: LOG5[ui]: stunnel 5.56 on x86_64-pc-linux-gnu platform
Oct 20 08:55:06 server1.dezix.fr stunnel[96921]: LOG5[ui]: Compiled with OpenSSL 1.1.1k 25 Mar 2021
Oct 20 08:55:06 server1.dezix.fr stunnel[96921]: LOG5[ui]: Running with OpenSSL 1.1.1n 15 Mar 2022
Oct 20 08:55:06 server1.dezix.fr stunnel[96921]: LOG5[ui]: Threading:PTHREAD Sockets:POLL,IPv6,SYSTEMD TLS:ENGINE,FIPS,>
Oct 20 08:55:06 server1.dezix.fr stunnel[96921]: LOG5[ui]: Reading configuration from file /etc/stunnel/micro-httpd.conf
Oct 20 08:55:06 server1.dezix.fr stunnel[96921]: LOG5[ui]: UTF-8 byte order mark detected
Oct 20 08:55:06 server1.dezix.fr stunnel[96921]: LOG5[ui]: FIPS mode disabled
Oct 20 08:55:06 server1.dezix.fr stunnel[96921]: LOG5[ui]: Configuration successful
Oct 20 08:55:06 server1.dezix.fr stunnel[96921]: LOG5[ui]: Binding service [micro-httpd] to :::443: Address already in >
Oct 20 08:55:06 server1.dezix.fr systemd[1]: stunnel@micro-httpd.service: Succeeded.
Il me reste donc à régler cette histoire de certificat qui n'est pas reconnu comme valide...

je me suis d'abord posé la question : "Est-ce que certbot --test-cert produit un certificat valide ou juste un fake histoire de tester la config ?"
J'ai donc testé :
Code : Tout sélectionner
# certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/dezix.fr.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert not yet due for renewal
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The following certificates are not due for renewal yet:
/etc/letsencrypt/live/dezix.fr/fullchain.pem expires on 2023-01-15 (skipped)
No renewals were attempted.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sauf que...
Alors que dois-je faire pour que le certificat fonctionne sans message affiché par le navigateur ?
Pour info firefox affiche :

J'ai déjà eu assez de mal à en arriver là, je ne voudrais pas me faire blacklister par ???????
le but ultime du certificat étant TLS pour le serveur mail qui va avec ce domaine.
Merci d'avance !