Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How renew date expiration of Certificate Authorities, OpenVpn Server Certificates and User Certificates in pfSense?

    Scheduled Pinned Locked Moved General pfSense Questions
    31 Posts 5 Posters 15.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      ramses.sevilla @Gertjan
      last edited by

      @gertjan thanks so much by your answer.

      Your solution has a problem for me and It is that I have over 300 OpenVpn Users.

      I am looking for another solution that permit me renew the expire date of the CA, Server and User Certificates without stop working.

      Is this possible?

      How can I do?

      Best regards

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        If you renew the CA but all the details stay the same it should continue to work, but in some cases you may have to copy the new CA to clients. Certificates will still see they are signed by the CA even after renewal since it's just renewed, not a different CA.

        Server certificates (GUI, OpenVPN, mobile IPsec, etc) can be renewed at any time, those aren't copied to clients.

        If you renew a user certificate you will have to copy the renewed certificate to the client, you can't avoid that.

        There isn't a way to do batch operations like mass renew in the GUI or shell currently.

        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        R 1 Reply Last reply Reply Quote 2
        • R
          ramses.sevilla @jimp
          last edited by

          @jimp I am checking in a testing environment the renew certificate option in pfSense 2.5.0.

          The CA Certificate renew, apparently, it does success.

          The User Certificate renew, apparently, it does success.

          But when I try renew the Server Certificate used by the OpenVPN server the following error is displayed:

          a7f5478f-f732-475f-901d-8c9e70f0fa20-imagen.png

          And I can't renew the Server Certificate used by the OpenVPN Server.

          What could it be?

          Best regards

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            I'm not aware of what might cause that general error. There may be some aspect of the certificate that is deprecated or no longer supported in OpenSSL for new certs. Hard to say without more details.

            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            R 1 Reply Last reply Reply Quote 0
            • R
              ramses.sevilla @jimp
              last edited by

              @jimp What more details do you need know about the server certificate?

              The certificate were created in pfSense 2.4.5-p1, in the proccess of create the OpenVPN Server, before update to pfSense 2.5.0.

              Regards

              GertjanG 1 Reply Last reply Reply Quote 0
              • GertjanG
                Gertjan @ramses.sevilla
                last edited by

                @ramses-sevilla
                Aren't these valid like 'ten years' or so ?
                See my image above.

                No "help me" PM's please. Use the forum, the community will thank you.
                Edit : and where are the logs ??

                R 1 Reply Last reply Reply Quote 0
                • R
                  ramses.sevilla @Gertjan
                  last edited by

                  @gertjan

                  Yes, this server certificate is valid for ten years but I am testing the renew certificates option that has been introduced in pfSense 2.5.0 and I can renew de CA Certificate and the User Certificate but when I try to renew the OpenVPN Server Certificate the following error is displayed:

                  e4a949dc-f0e6-49fb-aa3e-b1f7097a4f35-imagen.png

                  And I don't know why.

                  Best regards

                  provelsP 1 Reply Last reply Reply Quote 0
                  • provelsP
                    provels @ramses.sevilla
                    last edited by

                    @ramses-sevilla
                    Just a guess, but have you tried disabling the server before renewing the certificate?

                    Peder

                    MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
                    BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

                    jimpJ 1 Reply Last reply Reply Quote 0
                    • jimpJ
                      jimp Rebel Alliance Developer Netgate @provels
                      last edited by

                      @ramses-sevilla said in How renew date expiration of Certificate Authorities, OpenVpn Server Certificates and User Certificates in pfSense?:

                      Yes, this server certificate is valid for ten years but I am testing the renew certificates option that has been introduced in pfSense 2.5.0 and I can renew de CA Certificate and the User Certificate but when I try to renew the OpenVPN Server Certificate the following error is displayed:

                      Can you share the details of the certificate as shown in the GUI list and info box (click the "i" icon)? Nothing I have tried has resulted in that error.

                      @provels said in How renew date expiration of Certificate Authorities, OpenVpn Server Certificates and User Certificates in pfSense?:

                      @ramses-sevilla
                      Just a guess, but have you tried disabling the server before renewing the certificate?

                      That's not necessary, the renewal process will restart servers using the certificate afterward.

                      Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                      Need help fast? Netgate Global Support!

                      Do not Chat/PM for help!

                      R 1 Reply Last reply Reply Quote 1
                      • R
                        ramses.sevilla @jimp
                        last edited by

                        @jimp

                        fb732610-266e-4f94-8eb6-f4f216c4d941-imagen.png

                        08f60502-4e80-40ee-9214-8eccedbf5f0d-imagen.png

                        @provels

                        Yes, I have tried:

                        • Stopping the server.
                        • Disabling the server.

                        And I have created a new Server Certificate in pfSense 2.5.0 and I have tried to renew this new Server Certificate and It shows me the same error.

                        Has anyone tried to renew a Server Certificate in pfSense 2.5.0?

                        Regards

                        1 Reply Last reply Reply Quote 0
                        • jimpJ
                          jimp Rebel Alliance Developer Netgate
                          last edited by

                          I have renewed all kinds of certificates, server and otherwise, in 2.5 and they all work for me. Which leads me to believe it's something in your certificate data triggering the problem.

                          Can you try adjusting the CN so it doesn't have a space in it?

                          Not that it should be a problem but typically that's a short name or hostname and not a string like that. I can't recall if I tested that sort of value.

                          Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                          Need help fast? Netgate Global Support!

                          Do not Chat/PM for help!

                          R 1 Reply Last reply Reply Quote 0
                          • jimpJ
                            jimp Rebel Alliance Developer Netgate
                            last edited by

                            It's definitely the space in the CN doing it. I can reproduce that here:

                            https://redmine.pfsense.org/issues/11652

                            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                            Need help fast? Netgate Global Support!

                            Do not Chat/PM for help!

                            1 Reply Last reply Reply Quote 0
                            • R
                              ramses.sevilla @jimp
                              last edited by

                              @jimp

                              To adjust the CN I need create a new certificate, isn't it?

                              I can't modify the CN of the Server Certificate, isn't it?

                              The CA has space in the CN and renews the certificate without problem.

                              I have created a new certificate without spaces in the CN and renews fine.

                              Will the problem be solved?

                              Best regards

                              1 Reply Last reply Reply Quote 0
                              • jimpJ
                                jimp Rebel Alliance Developer Netgate
                                last edited by

                                @ramses-sevilla said in How renew date expiration of Certificate Authorities, OpenVpn Server Certificates and User Certificates in pfSense?:

                                @jimp

                                To adjust the CN I need create a new certificate, isn't it?

                                Yes, but since it's a server certificate which doesn't need to be sent to clients, that's typically easy, make a new cert, pick it to be used as the server cert, and that's it.

                                I can't modify the CN of the Server Certificate, isn't it?

                                Correct.

                                The CA has space in the CN and renews the certificate without problem.

                                That's expected as a CA is a different type of entry from a certificate, certificates have a lot more data in them and a lot more to go wrong.

                                Will the problem be solved?

                                Yes, I tracked it down further and the real problem is a lack of SAN entries in the certificate. Normally it will take the common name and add that as a SAN entry, but in these cases that kind of common name cannot be a valid SAN entry. The SAN list ends up empty since there are no manual entries nor the entry for the CN. The certificate renewal code was assuming all certificates have a SAN, which in these cases is not true.

                                You can install the System Patches package and then create an entry for 09d3fe621a56292817a85a54916e8b99e2b26c00 to apply the fix. With that fix applied, you can renew certificates with spaces or x509-escaped characters in their CN which lack SANs.

                                Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                                Need help fast? Netgate Global Support!

                                Do not Chat/PM for help!

                                R 1 Reply Last reply Reply Quote 2
                                • R
                                  ramses.sevilla @jimp
                                  last edited by

                                  @jimp

                                  I have applied the patch and now I can renew the Server Certificate fine in my testing environment.

                                  I have the production environment with a cluster in pfSense 2.4.5-p1. I had thought update to pfSense 2.5.0 because I need renew CA, Server and User Certificates but I have seen in the forum that the update to pfSense 2.5.0 break some services (Hardware, IPsec, DHCP Relay,...) that I have configured in my environment.

                                  I have some doubts:

                                  • Do you recommends me wait to the next pfSense version?

                                  • Will all patches be included in the next version?

                                  • How long will it take to get out the next version?

                                  • Can I renew a Certificate without problems if It has expired?

                                  Best regards

                                  jimpJ 1 Reply Last reply Reply Quote 0
                                  • jimpJ
                                    jimp Rebel Alliance Developer Netgate @ramses.sevilla
                                    last edited by

                                    @ramses-sevilla said in How renew date expiration of Certificate Authorities, OpenVpn Server Certificates and User Certificates in pfSense?:

                                    Do you recommends me wait to the next pfSense version?

                                    That's up to you.

                                    Will all patches be included in the next version?

                                    This fix will be, but not every single commit that's happened recently. Primary focus is on fixing regressions and other important behavior that isn't functioning properly.

                                    How long will it take to get out the next version?

                                    Not too long, but we don't have a firm ETA. Sometime in the next few weeks, most likely.

                                    Can I renew a Certificate without problems if It has expired?

                                    Yes, though if you wait until it expires, it may be rejected by clients after it expires.

                                    You could renew the certificate on a 2.5 lab system and then copy the certificate back over into the older configuration and use it there in the meantime.

                                    Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                                    Need help fast? Netgate Global Support!

                                    Do not Chat/PM for help!

                                    R 1 Reply Last reply Reply Quote 1
                                    • R
                                      ramses.sevilla @jimp
                                      last edited by

                                      @jimp

                                      Well, recopiling...

                                      I have a pfSense 2.4.5_1 cluster with OpenVPN Server in production.

                                      This pfSense have:

                                      Certificate Authorities --> ca-prod-1 --> Valid from: 23 Apr 2020 --> Valid Until: 21 Apr 2030 (Internal) --> OpenVPN Server

                                      Server Certificate (OpenVPN) --> srv-prod-1 --> Valid from: 23 Apr 2020 --> Valid Until: 21 Apr 2030

                                      User Certificate --> usr-prod-1 --> Valid from: 23 Apr 2020 --> Valid Until: 21 Apr 2030

                                      To renew the Expiration Date of the Certificates, I need:

                                      • First.- I need renew the Expiration Date of the Certificate Authority. I don't need send nothing to the OpenVPN Client nor modify nothing in the OpenVPN Server and everything will continue working fine. Right?

                                      • Second.- I need renew the Expiration Date of the Server Certificate. I don't need send nothing to the OpenVPN Client nor modify nothing in the OpenVPN Server and everything will continue working fine. Right?

                                      • Third.- I need renew the Expiration Date of the User Certificates. I need resend each renewed certificate to the user. Right?

                                      • Doubts:

                                      If expires the Expiration Date of the User Certificate, can I renew and send the renewed certificate later?.

                                      What would happen if the Certificate Authoritie expires?. Would everything still working?. Can I renew the Certificate Authoritie later?

                                      What would happen if the Server Certificate expires?. Would everything still working?. Can I renew the Server Certificate later?

                                      Best regards

                                      1 Reply Last reply Reply Quote 0
                                      • R
                                        ramses.sevilla
                                        last edited by

                                        @jimp thanks so much by your answers.

                                        I have other issues renewing Certificates.

                                        When I create a new User and I check the option of create Centificate, I select this options:

                                        9aad314f-065e-41fc-a84a-4ecc95b0d341-imagen.png

                                        If I go to "VPN > OpenVPN > Client Export" the new User appear to export it:

                                        48fe19b4-9bf0-48d6-b1c8-56877a13300d-imagen.png

                                        Well, if I try renew the Certificate of the new User (usuario2) it shows this:

                                        77d5a147-1805-418b-a9c4-2876d60d1793-imagen.png

                                        But I have selected Digest SHA256 when I have created the new User (usuario2).

                                        If I renew the Certificate of the new User and later go to "VPN > OpenVPN > Client Export", the new User (usuario2) not appear to export it:

                                        2a22e48a-97fa-4dec-8cf1-a588955b0888-imagen.png

                                        This occur even if I marck the option "Enforce strict security parameters" when renew the User Certificate.

                                        The other User that appears (soporte) is a User that I had created in pfSense before update to pfSense 2.5.0, and I can renew without problems, It not shows the problem of SHA2 when renew the Certificate and It appears in "VPN > OpenVPN > Client Export" to export it. In case It helps you.

                                        What can be the problem now?

                                        Best regards

                                        1 Reply Last reply Reply Quote 0
                                        • jimpJ
                                          jimp Rebel Alliance Developer Netgate
                                          last edited by

                                          I can't reproduce that here at all, but I'm also on RC snapshots (2.5.1 RC / 21.02.2 RC). Might be something we already fixed since the release.

                                          If I make a user cert from the user manager with SHA256, it gets SHA256. It shows for export. Renewal doesn't flag anything as needing changed. After renewal, it still shows for export.

                                          Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                                          Need help fast? Netgate Global Support!

                                          Do not Chat/PM for help!

                                          R 1 Reply Last reply Reply Quote 0
                                          • R
                                            ramses.sevilla @jimp
                                            last edited by

                                            @jimp hi,

                                            I have update pfSense 2.4.5-p1 to pfSense 2.5.1RC and I have the same problem.

                                            If I create the User Certificate (with SHA256):

                                            0a1ef45c-5d83-49ab-8751-d1fe6cb61649-imagen.png

                                            When I create the new user from User Manager, if I renew the User Certificate, It shows:

                                            2bef7742-2c97-49bf-b7b8-60ed3b312470-imagen.png

                                            And not appears in "VPN > OpenVPN > Client Export" to export.

                                            If I renew a User that was already created in pfSense 2.4.5-p1, I haven't problem.

                                            If I create a new User Certificate (SHA256) from Certificate Manager, when I renew the User Certificate, show that the certificate is SHA256 and I haven't problem. And If I edit the User that disappeared and associate this renewd certificate to the user, the User apppears again in "VPN > OpenVPN > Client Export" to export.

                                            I don't undertand what happens...

                                            Best regards

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.