OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • 24.1 Legacy Series »
  • Services: ACME Client: Certificates validation failed
« previous next »
  • Print
Pages: [1] 2

Author Topic: Services: ACME Client: Certificates validation failed  (Read 2329 times)

Blisk

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
    • View Profile
Services: ACME Client: Certificates validation failed
« on: September 06, 2024, 10:19:12 am »
Today suddenly certificate doesn't work. I get unasigned certificate when visit website,
When I check logs I have this error in the link. What can be reason for certificate doesn't update, because other web site is updated and it works. And there was no change on server or opensense firewall or domain settings. After update it today nothing happens, still doesn't work.
https://privatebin.povej.net/?b269015f39990e05#4KCy88sxcFxAQ7aMDBe3RV1m7eixgV5q7YPw2dSrJ6GA

Name
OPNsense.localdomain
Versions
OPNsense 24.7.3_1-amd64
FreeBSD 14.1-RELEASE-p3
OpenSSL 3.0.14
Uptime
01:57:49
Load average
0.28, 0.30, 0.26
Current date/time
Fri Sep 6 10:18:15 CEST 2024
Last configuration change
Fri Sep 6 8:55:24 CEST 2024
Logged

doktornotor

  • Hero Member
  • *****
  • Posts: 709
  • Karma: 70
    • View Profile
Re: Services: ACME Client: Certificates validation failed
« Reply #1 on: September 06, 2024, 11:41:46 am »
We've had ACME + LE randomly failing for ~ past week for no reason, not even using OPNsense for that. It eventually renews if you keep trying.

There's something broken on their end, really.

Probably related: https://community.letsencrypt.org/t/unexpected-renewal-failures-since-april-2024-please-read-this/216830
« Last Edit: September 06, 2024, 11:54:45 am by doktornotor »
Logged

Blisk

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
    • View Profile
Re: Services: ACME Client: Certificates validation failed
« Reply #2 on: September 06, 2024, 12:22:50 pm »
Thank you for notification.
So there is nothing to do to solve this but wait?
I can't wait and have my website not working.
I hope there is some solution for this
I already did this but didn't solve my problem
_acme-challenge.<YOUR_DOMAIN>
« Last Edit: September 06, 2024, 12:25:36 pm by Blisk »
Logged

doktornotor

  • Hero Member
  • *****
  • Posts: 709
  • Karma: 70
    • View Profile
Re: Services: ACME Client: Certificates validation failed
« Reply #3 on: September 06, 2024, 12:41:21 pm »
Well, normally you renew ACME certificates well in advance, not one day before they expire. As said, making repeated attempts worked here.

Quote
I already did this but didn't solve my problem
_acme-challenge.<YOUR_DOMAIN>

Not sure what you did where really. DNS-01 does not work the way you imagine. The client needs to create the TXT records from the token provided by ACME, dynamically via API with your DNS provider.
Logged

Blisk

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
    • View Profile
Re: Services: ACME Client: Certificates validation failed
« Reply #4 on: September 06, 2024, 12:58:25 pm »
I have added in my DNS provider that _acme-challenge.<YOUR_DOMAIN>
probably that is not all what I need to do.
I tried to renew certificate many times but still doesn't work.
Logged

doktornotor

  • Hero Member
  • *****
  • Posts: 709
  • Karma: 70
    • View Profile
Re: Services: ACME Client: Certificates validation failed
« Reply #5 on: September 06, 2024, 01:09:01 pm »
But your are not using DNS-01 at all... why would you be adding that? Plus again, those CNAME records are used for delegation, not validation. https://www.eff.org/deeplinks/2018/02/technical-deep-dive-securing-automation-acme-dns-challenge-validation


2024-09-06T08:55:24   opnsense   AcmeClient: domain validation failed (http01)
« Last Edit: September 06, 2024, 01:11:59 pm by doktornotor »
Logged

meyergru

  • Hero Member
  • *****
  • Posts: 1757
  • Karma: 171
  • IT Aficionado
    • View Profile
    • congenio
Re: Services: ACME Client: Certificates validation failed
« Reply #6 on: September 06, 2024, 01:15:23 pm »
The logs show that the verification ist not attempted via DNS-01, but via HTTP-01.

For that to work, you must present the ACME verification token in "http://yourtop.news/.well-known/acme-challenge/<file>".

However, your web server obviously is configured to reply with a 301 redirect to all requests on port 80 to use HTTPS:

Code: [Select]
wget -O- --no-check-certificate http://yourtop.news/.well-known/acme-challenge/x
--2024-09-06 13:05:43--  http://yourtop.news/.well-known/acme-challenge/x
Resolving yourtop.news (yourtop.news)... 31.15.171.21
Connecting to yourtop.news (yourtop.news)|31.15.171.21|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://yourtop.news/.well-known/acme-challenge/x [following]
--2024-09-06 13:05:43--  https://yourtop.news/.well-known/acme-challenge/x
Connecting to yourtop.news (yourtop.news)|31.15.171.21|:443... connected.
WARNING: cannot verify yourtop.news's certificate, issued by ‘CN=R11,O=Let's Encrypt,C=US’:
  Issued certificate has expired.
HTTP request sent, awaiting response... 404 Not Found
2024-09-06 13:05:43 ERROR 404: Not Found.

So maybe you forgot to handle ".well-known" differently? Of course that depends on how or where you do the verification. Sometimes, the port is only handled during the verification step such that the output above is not representative. However, the timinig in you log suggests that the web server does answer, but incorrectly.

Logged
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 440 up, Bufferbloat A+

doktornotor

  • Hero Member
  • *****
  • Posts: 709
  • Karma: 70
    • View Profile
Re: Services: ACME Client: Certificates validation failed
« Reply #7 on: September 06, 2024, 01:20:37 pm »
Quote from: meyergru on September 06, 2024, 01:15:23 pm
However, your web server obviously is configured to reply with a 301 redirect to all requests on port 80 to use HTTPS:

Did not even check that, since the OP claims:

Quote
there was no change on server or opensense firewall or domain settings. After update it today nothing happens, still doesn't work.

If that was the case, it'd have never worked in the first place. Sigh.
Logged

meyergru

  • Hero Member
  • *****
  • Posts: 1757
  • Karma: 171
  • IT Aficionado
    • View Profile
    • congenio
Re: Services: ACME Client: Certificates validation failed
« Reply #8 on: September 06, 2024, 01:27:59 pm »
Even if you have instructed your provider to delegate something for DNS-01 challenge, this sure does not work either:

Code: [Select]
#nslookup -query=any _acme-challenge.yourtop.news
;; Got SERVFAIL reply from 127.0.0.53
Server:         127.0.0.53
Address:        127.0.0.53#53

** server can't find _acme-challenge.yourtop.news: SERVFAIL
Logged
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 440 up, Bufferbloat A+

Blisk

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
    • View Profile
Re: Services: ACME Client: Certificates validation failed
« Reply #9 on: September 06, 2024, 01:36:20 pm »
thank you for your answers.
I am now totally lost here. I didn't setup this firewall someone else did and I am trying now to solve this problem.
I really don't know what to setup and where to solve this.
Port 80 should redirect to port 443.
Logged

Blisk

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
    • View Profile
Re: Services: ACME Client: Certificates validation failed
« Reply #10 on: September 06, 2024, 01:38:03 pm »
Quote from: meyergru on September 06, 2024, 01:27:59 pm
Even if you have instructed your provider to delegate something for DNS-01 challenge, this sure does not work either:

Code: [Select]
#nslookup -query=any _acme-challenge.yourtop.news
;; Got SERVFAIL reply from 127.0.0.53
Server:         127.0.0.53
Address:        127.0.0.53#53

** server can't find _acme-challenge.yourtop.news: SERVFAIL

this is what I did
Logged

doktornotor

  • Hero Member
  • *****
  • Posts: 709
  • Karma: 70
    • View Profile
Re: Services: ACME Client: Certificates validation failed
« Reply #11 on: September 06, 2024, 01:39:56 pm »
For that last time:

Your ACME is NOT set up to use DNS-01 so whatever you do in DNS with _acme-challenge.yourtop.news is irrelevant. (And - as also already noted, delegation is done via CNAME, not TXT. TXT is created dynamically via API, you CANNOT prepopulate it manually.)

For HTTP-01 to work, you MUST NOT be redirecting the well-known URL to HTTPS.
« Last Edit: September 06, 2024, 01:41:49 pm by doktornotor »
Logged

Blisk

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
    • View Profile
Re: Services: ACME Client: Certificates validation failed
« Reply #12 on: September 06, 2024, 01:49:24 pm »
I know that my ACME is not setup.
So what I need to do, change my ACME to use DNS-01 or there is another way to solve this.
If not than how I need to change my ACME to use DNS-01
I have 2 domains in and first one works OK, this second one doesn't and both are set the same.
Logged

doktornotor

  • Hero Member
  • *****
  • Posts: 709
  • Karma: 70
    • View Profile
Re: Services: ACME Client: Certificates validation failed
« Reply #13 on: September 06, 2024, 02:01:20 pm »
You must disable the HTTPS redirect as already noted. Then it will work. You can re-enable after you have your certificate. Forget about DNS-01 at the moment, you clearly need to do some reading on how the thing works.
Logged

Blisk

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
    • View Profile
Re: Services: ACME Client: Certificates validation failed
« Reply #14 on: September 06, 2024, 02:03:07 pm »
Quote from: doktornotor on September 06, 2024, 02:01:20 pm
You must disable the HTTPS redirect as already noted. Then it will work. You can re-enable after you have your certificate. Forget about DNS-01 at the moment, you clearly need to do some reading on how the thing works.
I know I need to read a lot more about how it works because I don't know.
thank you for advice I will do
Logged

  • Print
Pages: [1] 2
« previous next »
  • OPNsense Forum »
  • English Forums »
  • 24.1 Legacy Series »
  • Services: ACME Client: Certificates validation failed
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2