Https://bap.a3a-architecture.fr/

Bonjour à tous,

j'ai un souci de renouvellement de certificat sur le site https://bap.a3a-architecture.fr/
la commande ci dessous m'indique à priori que tout est ok
admin$ sudo certbot renew --dry-run --cert-name bap.a3a-architecture.fr
Password:
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /etc/letsencrypt/renewal/bap.a3a-architecture.fr.conf


Simulating renewal of an existing certificate for bap.a3a-architecture.fr


Congratulations, all simulated renewals succeeded:
/etc/letsencrypt/live/bap.a3a-architecture.fr/fullchain.pem (success)

Pourtant le certificat est toujours en date d'expiration au 30/10/2024 et sur Chrome Safari ou Firefox il apparait comme non sécurisé. De plus comment renouivller automatiquement ce certificat Let's encrypt, je n'ai pas réussi à mettre en oeuvre la commande. Merci de votre aide

Habituellement, je dirais : c'est normal, car vous utilisez l'option --dry-run. Si vous exécutez à nouveau Certbot sans cette option, vous renouvellerez votre certificat « pour de vrai » au lieu d'utiliser l'environnement de test.

Cependant, en regardant crt.sh | 15248930267, je vois que vous avez effectivement renouvelé votre certificat ce matin (vous pouvez vérifier en exécutant certbot certificates.

Quelle était la commande initiale avec laquelle vous avez obtenu votre premier certificat ?

Translated from English with Google Translate.

Aussi:

Veuillez remplir les champs ci-dessous pour que nous puissions vous aider. Remarque : vous devez fournir votre nom de domaine pour obtenir de l’aide. Les noms de domaine des certificats émis sont tous rendus publics dans les journaux de Transparence de Certificat (par exemple, crt.sh | example.com). Par conséquent, le fait de ne pas indiquer votre nom de domaine ici n’aide pas à le garder secret, mais rend plus difficile pour nous le fait de vous aider.

Je peux lire des réponses en Anglais :

Mon nom de domaine est :

J’ai exécuté cette commande :

Elle a produit cette sortie :

Mon serveur Web est (inclure la version) :

Le système d’exploitation sur lequel mon serveur Web s’exécute est (version incluse) :

Mon hébergeur, le cas échéant, est :

Je peux me connecter à un shell root sur ma machine (oui ou non, ou je ne sais pas) :

J’utilise un panneau de configuration pour gérer mon site (non, ou fournit le nom et la version du panneau de configuration) :

Merci Osiris
J'ai passé la commande sans dry run (sudo certbot renew --cert-name bap.a3a-architecture.fr) et j’obtiens ceci :
sudo certbot renew --cert-name bap.a3a-architecture.fr
Password:
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /etc/letsencrypt/renewal/bap.a3a-architecture.fr.conf


Certificate not yet due for renewal


The following certificates are not due for renewal yet:
/etc/letsencrypt/live/bap.a3a-architecture.fr/fullchain.pem expires on 2025-02-05 (skipped)
No renewals were attempted.

De ce que je comprends pas de renouvellement attendu avant 05/02/25 et pourtant site toujours non sécurisé et inacessible sur certains navigateurs

Mon nom de domaine est : bap.a3a-architecture.fr/

J’ai exécuté cette commande : sudo certbot renew --cert-name bap.a3a-architecture.fr

Elle a produit cette sortie : The following certificates are not due for renewal yet:
/etc/letsencrypt/live/bap.a3a-architecture.fr/fullchain.pem expires on 2025-02-05 (skipped)
No renewals were attempted.

Mon serveur Web est (inclure la version) : MAMP Pro 5.5.1

Le système d’exploitation sur lequel mon serveur Web s’exécute est (version incluse) : Monterey 12.7.6

Mon hébergeur, le cas échéant, est :

Je peux me connecter à un shell root sur ma machine (oui ou non, ou je ne sais pas) : oui

J’utilise un panneau de configuration pour gérer mon site (non, ou fournit le nom et la version du panneau de configuration) : non

1 Like

Avec le commande certbot certificates, j'obtiens ceci :
admin$ certbot certificates
The following error was encountered:
[Errno 13] Permission denied: '/var/log/letsencrypt/.certbot.lock'
Either run as root, or set --config-dir, --work-dir, and --logs-dir to writeable paths.
Je ne sais pas quoi faire avec ça

try

sudo certbot certificates
2 Likes

Thank you Ok now i get this :
admin$ sudo certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Found the following certs:
Certificate Name: bap.a3a-architecture.fr
Serial Number: 47f37f12731d49a11cce083f9530ffda06d
Key Type: ECDSA
Domains: bap.a3a-architecture.fr
Expiry Date: 2025-02-05 14:11:40+00:00 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/bap.a3a-architecture.fr/fullchain.pem
Private Key Path: /etc/letsencrypt/live/bap.a3a-architecture.fr/privkey.pem

it seems to expier on 2025-02-05 however on my browsers the website is not secured and is expired since 10/30/2024 ; Have i missed something ?

1 Like

Did you restart Apache after getting the cert?

3 Likes

U're absolutely right it's now renew to 2025-02-05 Thank you so much
Great help

4 Likes

How can i set an automatic renewal on that certificate ?

The cert probably is auto-renewing.
The problem [to me] seems to be that the web server doesn't auto-restart/reload after the cert has been renewed.

1 Like

You can add a --deploy-hook with a specific reload command for your webserver, which wil run if the certificate was renewed.

You can use sudo certbot reconfigure --cert-name bap.a3a-architecture.fr --deploy-hook "enter reload command here" to reconfigure your existing certificate for future renewals. (If your Certbot is new enough.)

2 Likes

Thank you rg305 and Osiris will try that and will let you know.

4 Likes

Hello as i'm not really sure about the syntax for this command, am i on the good path with that ?
sudo certbot reconfigure --cert-name bap.a3a-architecture.fr --deploy-hook “service apache reload"

Yes, that should entirely be the correct command.

1 Like

hi everybody
ok the latest command is enter
now i have a new error message, logs here :slight_smile: [Thu Nov 28 22:59:19 2024] [error] [client 67.60.128.211] Invalid URI in request POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1
[Fri Nov 29 00:04:02 2024] [error] [client 60.221.228.127] Invalid URI in request POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1
[Fri Nov 29 04:44:44 2024] [error] Hostname cloud.a3a.archi provided via SNI and hostname 81.250.146.229 provided via HTTP are different
[Fri Nov 29 19:24:20 2024] [error] [client 47.251.31.177] Invalid URI in request POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1
[Fri Nov 29 22:22:26 2024] [error] [client 79.124.58.138] File does not exist: /Applications/MAMP/htdocs/bap/web/.git
[Sat Nov 30 08:01:15 2024] [error] [client 8.222.197.183] Invalid URI in request POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1
[Sun Dec 01 00:16:53 2024] [error] Hostname office.a3a.archi provided via SNI and hostname 81.250.146.229 provided via HTTP are different
[Sun Dec 01 02:25:00 2024] [error] [client 159.65.89.227] Invalid Content-Length
[Sun Dec 01 04:05:28 2024] [error] [client 172.105.246.139] Invalid Content-Length
[Sun Dec 01 04:05:46 2024] [error] [client 172.105.246.139] Invalid URI in request GET default.asp HTTP/1.1
[Sun Dec 01 04:07:56 2024] [error] [client 27.106.121.146] Invalid URI in request POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1
[Sun Dec 01 07:50:46 2024] [error] [client 8.218.133.9] Invalid URI in request POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1
[Sun Dec 01 09:52:56 2024] [error] Hostname bap.a3a-architecture.fr provided via SNI and hostname 81.250.146.229 provided via HTTP are different
[Sun Dec 01 22:06:31 2024] [error] [client 57.141.0.27] File does not exist: /Applications/MAMP/htdocs/bap/web/.well-known
[Mon Dec 02 03:13:35 2024] [error] [client 8.216.86.132] Invalid URI in request POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1
[Mon Dec 02 05:53:17 2024] [error] [client 144.126.229.46] Invalid URI in request POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1
[Mon Dec 02 09:50:26 2024] [notice] caught SIGTERM, shutting down

Any idea ?
Thanks community

Those are just random scripted "attacks" against "known exploits". They show up in the logs of every webserver connected to the internet.

In this case it's an attempt to exploit CVE-2021-41773.

i have this message


Ports 80 and 443 are open on the router

i've added an htaccess file here /Applications/MAMP/htdocs/bap/web/ with this command :

RewriteEngine On
RewriteCond %{REQUEST_URI} ../
RewriteRule ^ - [F,L]

Same error

résolu avec IA merci à tous

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.