OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Web Proxy Filtering and Caching (Moderator: fabian) »
  • 24.1 breaks HAProxy Let's Encrypt setup
« previous next »
  • Print
Pages: [1]

Author Topic: 24.1 breaks HAProxy Let's Encrypt setup  (Read 3317 times)

mgrunwald

  • Newbie
  • *
  • Posts: 4
  • Karma: 3
    • View Profile
24.1 breaks HAProxy Let's Encrypt setup
« on: January 30, 2024, 05:11:05 pm »
The update from 23.7.12_5 to 24.1 breaks my HAProxy Let's Encrypt setup. I have multiple wildcard certificates in the ACME client and I use a CloudFlare DNS challenge. After the update the first certificate in the list is used for every connection and I get a NET::ERR_CERT_COMMON_NAME_INVALID error. Before the upgrade when I made a connection to a domain that was not covered by the first cert, the correct one was used. What is going on?

edit: after some troubleshooting I think I identified the problem and created a GitHub issue: https://github.com/opnsense/plugins/issues/3779
« Last Edit: January 30, 2024, 06:37:41 pm by mgrunwald »
Logged

Benerages

  • Newbie
  • *
  • Posts: 3
  • Karma: 1
    • View Profile
Re: 24.1 breaks HAProxy Let's Encrypt setup
« Reply #1 on: January 30, 2024, 07:30:45 pm »
Happens with my HAProxy Installation aswell. Only the top Cert in the list is getting used.
Logged

mnaim

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 5
    • View Profile
Re: 24.1 breaks HAProxy Let's Encrypt setup
« Reply #2 on: January 30, 2024, 09:06:39 pm »
I have same problem.

For those who wants back running HaProxy before fix will be issued:

1)locate in /tmp/haproxy/ssl file *.certlist
2)in that file remove all oscp suffix, leave just file on each row, save
3)SSH
killall haproxy
/usr/local/sbin/haproxy -q -f /usr/local/etc/haproxy.conf -p /var/run/haproxy.pid

HAProxy should be running fine.

This is not final solution, and any restart or save via GUI will overwrite that.
Just emergency solution to keep HAProxy running.
Logged

mnaim

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 5
    • View Profile
Re: 24.1 breaks HAProxy Let's Encrypt setup
« Reply #3 on: January 30, 2024, 09:32:47 pm »
After study of source code, even more elegant solution is Settings->Global parameters->Automatic OSCP updates -> OFF
APPLY
STILL TEMPORARY FIX - oscp certificates not working in firefox, but better than nothing :)
Logged

fraenki

  • Full Member
  • ***
  • Posts: 175
  • Karma: 29
    • View Profile
    • GitHub
Re: 24.1 breaks HAProxy Let's Encrypt setup
« Reply #4 on: January 30, 2024, 11:04:20 pm »
A hotfix is available:
https://github.com/opnsense/plugins/issues/3779#issuecomment-1917956814
Logged

blacksteel1288

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
    • View Profile
Re: 24.1 breaks HAProxy Let's Encrypt setup
« Reply #5 on: February 04, 2024, 05:41:33 pm »
I was experiencing this issue, but the hotfix seems to have addressed it, but I now see another problem related to it.

I'm now seeing a duplicate certificate for one domain in the HAProxy Public Service Certificates, even though there is only 1 certificate for that domain in the ACME plugin list. 

I've re-run the automation from the ACME service several times, but I'm still seeing two certificates in HAProxy when there should be only one.  Since the name is the same for both, I don't know which is correct.
« Last Edit: February 04, 2024, 06:29:27 pm by blacksteel1288 »
Logged

fraenki

  • Full Member
  • ***
  • Posts: 175
  • Karma: 29
    • View Profile
    • GitHub
Re: 24.1 breaks HAProxy Let's Encrypt setup
« Reply #6 on: February 05, 2024, 11:32:33 am »
Quote from: blacksteel1288 on February 04, 2024, 05:41:33 pm
I'm now seeing a duplicate certificate for one domain in the HAProxy Public Service Certificates, even though there is only 1 certificate for that domain in the ACME plugin list. 

os-haproxy displays all certificates from System->Trust->Certificates. You need to check this page to get more details about the duplicate certificate.

Besides that os-acme-client will also log a message if a certificate is imported into System->Trust->Certificates, so you should be able to trace this.
Logged

blacksteel1288

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
    • View Profile
Re: 24.1 breaks HAProxy Let's Encrypt setup
« Reply #7 on: February 06, 2024, 03:43:22 pm »
Thanks, yes, that's what I needed.  There was an old, expired certificate in the list for some reason.  I deleted it and now the list in haproxy looks fine.

I hadn't realized that was where the certificate list lived!

Thank you!
Logged

mathy1241

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: 24.1 breaks HAProxy Let's Encrypt setup
« Reply #8 on: February 17, 2024, 05:30:21 pm »
Hello to all,
The issue also occurs with my configuration. I have checked all the specified actions. Unfortunately, there was no success.
HA Proxy version 4.3 is installed.
Please kindly help me to fix this issue.
Thanks & best regards
Mathi
Logged

meyergru

  • Hero Member
  • *****
  • Posts: 1757
  • Karma: 171
  • IT Aficionado
    • View Profile
    • congenio
Re: 24.1 breaks HAProxy Let's Encrypt setup
« Reply #9 on: February 17, 2024, 06:17:01 pm »
See this and look at the last entry in the changelog here - the tutorial has been revised for 24.1, you have to set "strict-sni" now.
« Last Edit: February 17, 2024, 06:19:47 pm by meyergru »
Logged
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 440 up, Bufferbloat A+

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Web Proxy Filtering and Caching (Moderator: fabian) »
  • 24.1 breaks HAProxy Let's Encrypt setup
 

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