Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    SSl certificates for all home network

    Scheduled Pinned Locked Moved General pfSense Questions
    50 Posts 5 Posters 1.2k Views 6 Watching
    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.
    • B Offline
      bookie56
      last edited by

      Hi guys!
      I have as said before a setup with a 4 port nic and the ineternal nic is the WAN.
      My computers are on the LAN_PRIVATE subnet as I have called it and my pfsense is connected to the LAN_PRIVATE subnet...

      At the moment I have a selfsigned certificate in place and have added that info to my Windows computer so I don't get an unsecure network.

      I would like to have all my home network servers on the LAN_PRIVATE subnet to be able to have ssl cert verification without having to add that information to all servers....

      So if I login to my pfsense from any computer I can do that without security warnings and the same for all my servers...

      It is only me that has access - but it would be nice to connect to all my home network servers etc and get certificates automatically for them..

      I have to tried to follow so many videos and different scenarios - but it gets a bit overwhelming...

      I have created a free domain with duckdns and can use that...
      I have seen this can be done with let's encrypt and HAProxy....but like I have said above it just gets blurred with all the different scenarios...

      I just want access to my local network servers etc with secure connections...

      Is there anyone that would like to help me with this project ...not looking for the WAN just LAN...
      I heard if I have a wildcard it will include all connections on LAN_PRIVATE....

      I would appreciate any help I can get. I don't mind the learning curve...just someone's patience while I learn...

      bookie56

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG Offline
        Gertjan @bookie56
        last edited by

        @bookie56

        The short story is : you want to know what https is all about.
        What about starting at the top you are looking now ?! There is a line with (very !) important info.
        Here it is :

        22e06314-39a7-4859-99a4-5a969c6eec59-image.png

        You can see that netgate.com is more bold. You've wondered why ?
        Click on 'shield' that marked green.
        Continue until you see this info :

        72450c3f-f981-4c4c-b937-9cfb10f8b5e9-image.png

        This is the server certificate that the netgate's web server gave your browser.
        This certificate has build info : you can see it: "Common Name forum.netgate.com" and for https == your browser to be happy, the host name used :
        f5364b75-1b35-4964-9c25-03c44d8d676f-image.png

        must match what the browser found in the certificate.
        But there is more.
        The certificate was signed at the top level by :

        b6d3bd1d-8703-41e7-a2cf-e3277e60163c-image.png

        and your browser trusts all certificates that are come from this ISRG Root X1 CA certificate.
        You browser has a whole list of known trusted CA certificates.

        This matches with what you've done on your own pfSense and web browser devices : you've create you own == self signed CA certificate.
        You created a web server certificate for your pfSense, and the GUI == the web server of pSense uses it.
        You've exported the CA certificate from pfSense to the device on which you use a browser. From then on, your browser will also trust 'your' CA as you've included it into the browser's certificate store.

        The fact that you created your own CA (on pfSense) and used that in your browser and not a 'world known' CA like certificate like "ISRG Root X1" makes do difference : the connection has the same security level.
        One difference : yours is free. But you had to do 'something' to make it work.

        You've discovered that certificate created by Letsencrypt are trusted by all browser 'out of the box'. The one used here, for forum.netgate.com is a good example.

        If you want to have a certificate from, for example, Letsencrypt, you should/could start here : How it works.
        I'll boil it down to one phrase :
        You need to be able to proof that you 'own' your domain name, in this case "forum.netgate.com".

        Letencrypt isn't going to call someone over the phone and ask for a proof, it needs to be done by using a "script".
        A know test is : The "Letencrypt test server" will check on the forum.netgate.com if a special file exists - and this file should contain a special, secret text like :

        'eyJjb250YWN0IjogWyJtYWlsdG86Z3cua3JvZWJAZ21haWwuY29tIl0sICJ0ZXJtc09mU2VydmljZUFncmVlZCI6IHRydWV9'
        

        and the file name should be : 'K7BcPJEgYGOU8w4GBkWPG5Ivc7sfHVJKXKjtt2aSCDN3E54S6ys'

        Where do these cods come from ?

        On your side, when you use acme.sh for example, acme.sh will ask for these two codes from Letsencrypt. It's Letsencrypt who will randomly generate them.
        Your acme.sh will create the filer with the name 'K7BcPJEgYGOU8w4GBkWPG5Ivc7sfHVJKXKjtt2aSCDN3E54S6ys' and put this :
        'eyJjb250YWN0IjogWyJtYWlsdG86Z3cua3JvZWJAZ21haWwuY29tIl0sICJ0ZXJtc09mU2VydmljZUFncmVlZCI6IHRydWV9'
        in it as the content.
        Then that's done, acme.sh tells Letencrypt : go verify me.
        The "Letencrypt test server will now visit this host / file : (actually a web page) :
        fouem.netgate.com/K7BcPJEgYGOU8w4GBkWPG5Ivc7sfHVJKXKjtt2aSCDN3E54S6ys

        and the content should be :
        'eyJjb250YWN0IjogWyJtYWlsdG86Z3cua3JvZWJAZ21haWwuY29tIl0sICJ0ZXJtc09mU2VydmljZUFncmVlZCI6IHRydWV9'

        If that checked out, the Letsencrypt know you are the owner of => you showed you controlled the domain name "forum.netgate.com".

        Btw : this is just a method, the so called web server method (acme.sh calls it DNS API), there are other check mechanisms also. The ones based on DNS are best.

        But you need to 'own' (== rent) a domain name like forum.netgate.com. or example.com, etc.
        You must be able to proof that you control you domain, or sub domain.

        I might be possible (I never tried this myself) that you create a dyndns sub domain like "example.duckdns .com" and have this pointing to your WAN IP (pfSense) and have it answered by a web server that can 'serve the check file' to Letencrypt.

        But wait ... You shouldn't bust the KIS rule :
        Your own CA and the web server certificates you created from it, these can be valid for years.
        Do you really use that many devices from which you visit pfSense GUI ? Ok, you might have to import the CA on several devices. How long did that took ? Ones done, you have the same security.

        No "help me" PM's please. Use the forum, the community will thank you.

        B 1 Reply Last reply Reply Quote 0
        • B Offline
          bookie56 @Gertjan
          last edited by

          @Gertjan Hi!
          Thanks for coming buy.....funny you should ask how many devices....my partner thinks I am a hoarder😊
          At the moment I would need to import that cert to about 14 computers...so yes....it can be done was just hoping to have pfsense control all....
          Yes, I agree the self signed are fantastic....the one I have is valid to 2033...😊
          I do appreciate your time and yes I can import the certificate to all my computers ....just with the HAProxy i was under the impression that could be automated for all the home network...

          bookie56

          GertjanG johnpozJ 2 Replies Last reply Reply Quote 0
          • GertjanG Offline
            Gertjan @bookie56
            last edited by

            @bookie56 said in SSl certificates for all home network:

            just with the HAProxy i was under the impression that could be automated for all the home network...

            acmes.sh, the pfSense package that handles certificate renewal for pfSense, can do this for you.
            You can supply 'home made scripts' that communicate obtained certificates to other devices.

            8545fe56-4e74-4354-9802-6251be68e961-image.png

            If you have a lot of time left, these are nice projects to take care of.
            Take in consideration that Letsencrypt 'free' certificates are valid for 90 days max, normally you auto renew them every 60 days or so. That means you have to transfer the new certificate files to your devices 6 times per year.
            It would work just fine : accept the auto signed NAS, printer, AP certificate ones, and be done with it.
            But, as I had a wild card trusted signed certificate for my pfSense, I decided to automatize the transfer, see if it was possible. Loads of bash, python and other scp commands later, it worked.

            Btw : I had to use a official trusted certificate, not for my, the pfSEnse admin, but because I use the captive portal for a hotel.
            I can't initiate a captive portal login page over http as many (hotel client !) browsers will start yell. And a auto signed https is also not done, as this will produce even more scary browser messages.
            So I had to get a domain name, and obtain a cert for it.

            No "help me" PM's please. Use the forum, the community will thank you.

            B 1 Reply Last reply Reply Quote 0
            • johnpozJ Online
              johnpoz LAYER 8 Global Moderator @bookie56
              last edited by

              @bookie56 said in SSl certificates for all home network:

              At the moment I would need to import that cert to about 14 computers...so yes

              you have 14 things serving up services via ssl, or you have 14 devices that will need to access these services over ssl?

              Keep in mind you only need to install the CA that signs your certs once. And you really only need that ca on machines where you will access these services.

              You could go the HA reverse proxy route - but that would be more for browsers so give you warning when the services doesn't really support ssl.

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 26.03 | Lab VMs 2.8.1, 26.03

              B 1 Reply Last reply Reply Quote 0
              • B Offline
                bookie56 @Gertjan
                last edited by

                @Gertjan This looks interesting and of course I don't mind learning new things...

                bookie56

                1 Reply Last reply Reply Quote 0
                • B Offline
                  bookie56 @johnpoz
                  last edited by bookie56

                  @johnpoz said in SSl certificates for all home network:

                  @bookie56 said in SSl certificates for all home network:

                  At the moment I would need to import that cert to about 14 computers...so yes

                  you have 14 things serving up services via ssl, or you have 14 devices that will need to access these services over ssl?

                  Keep in mind you only need to install the CA that signs your certs once. And you really only need that ca on machines where you will access these services.

                  You could go the HA reverse proxy route - but that would be more for browsers so give you warning when the services doesn't really support ssl.

                  Hi @johnpoz ...
                  Sorry...wasn't that clear...
                  I have serveral computers running Windows and Linux and then several severs running linux...
                  At the moment I have imported my self-signed certificate to 3 Windows machines....
                  Yes, it isn't the end of the world but when I sit at one of those machines and access my home servers which are running OMV i get the not secure window....yes...I can ignore that or do as for Windows import the certificate...
                  Just a bit tedious...
                  I have created a duckdns domain ...added acme and createted the keys and wildcard certificate just not sure how I can implement that in HAProxy to automate the whole process... or is this just over kill?

                  bookie56

                  GertjanG 1 Reply Last reply Reply Quote 0
                  • GertjanG Offline
                    Gertjan @bookie56
                    last edited by Gertjan

                    @bookie56 said in SSl certificates for all home network:

                    I have created a duckdns domain ...added acme and createted the keys and wildcard certificate just not sure how ...

                    After reading acme.sh 'Use DuckDNS.org API' manual (didn't took long 😊 ) I guess you're all set up already.

                    If you ask for a wildcard certificate you should read also this one.

                    This means you have to add two (2) entries under the SAN List :
                    One with

                    your-domain-at.duckdns.org
                    

                    and this one

                    *.your-domain-at.duckdns.org
                    

                    Both use of the same DUCK token.


                    Wow.
                    I actually created your-domain-at.duckdns.org, and needed minutes to find the token ...
                    It was staring at me all the time :

                    de2418df-a116-4060-b354-79b7d5de2cbc-image.png

                    I quick and dirty acme.sh setup on the pfSense side :

                    1d2a25ba-2a0e-4e13-ac83-7ce80898a0ae-image.png

                    I did set DNS sleep to 60 - 120 or more could be better.

                    While waiting, I watched the progress :

                    [26.03-RELEASE][root@pfSense.bhf.tld]/tmp/acme/your-domain-at.duckdns.org: tail -f acme_issuecert.log
                    

                    as this show you what happens.
                    Why looking at this log file ? As it tells you when thing go good. That's important to know, as this will your 'base-line'.
                    When things go bad, look at the same log, and compare with the good log.
                    As by magic (not at all actually) you see what went wrong.

                    Anyway, for me, it ended with an 'Ok'.
                    And the green GUI for those who love images (that don't say anything that matters) :

                    33bdb5ba-8070-47cd-88ea-d319b9e30e20-image.png

                    Now I have a cert - and it will auto renew after 120 days while me doing something else.

                    Note :
                    I didn't add any action like :

                    16e3c603-9cc6-4d45-95e6-fd1292e902a7-image.png

                    you probably want to do this.

                    Now the part : how to transfer this certificate (chain) over to your pother devices.
                    That's doesn't have a "click here and done" solution. I stole everything from the Internet (of course) and adapted modified stuff for my needs. I recall even adding scripts into Unifi key controller as I send certificate to that device also.
                    You've Linux boxes so that part will be easy.

                    Only server devices need the certificate. All your other client devices will accept your certificate out of the box.

                    Imho : do check ones in a while the certificate auto renewal process.
                    Never ever trust automated process, treat them like kids.
                    I've seen "duckdns issues" a bit to often here on the forum, and the subject was never 'Wow, this works great !'.... wait, yes, there is one that says exactly that : I just did !! because it did.
                    Less then 3 minutes (and two minutes me looking for the TOKEN) and I had a certificate 👍

                    No "help me" PM's please. Use the forum, the community will thank you.

                    B 1 Reply Last reply Reply Quote 1
                    • B Offline
                      bookie56 @Gertjan
                      last edited by

                      @Gertjan
                      Yes, that is correct....😊

                      GertjanG 1 Reply Last reply Reply Quote 0
                      • GertjanG Offline
                        Gertjan @bookie56
                        last edited by

                        @bookie56
                        look above.

                        No "help me" PM's please. Use the forum, the community will thank you.

                        B 1 Reply Last reply Reply Quote 0
                        • B Offline
                          bookie56 @Gertjan
                          last edited by

                          @Gertjan I have my pfsense on 8443 and have tried to use my new cert with duckdns.org but it will not go there...
                          I am lost as to what is causing the problem...

                          bookie56

                          GertjanG 1 Reply Last reply Reply Quote 0
                          • GertjanG Offline
                            Gertjan @bookie56
                            last edited by

                            @bookie56

                            As shown above, I have this certificate now :

                            bb924a3c-d913-4d10-98b3-4913a893f161-image.png

                            This is not ( ! ) a wild card certificate.

                            To use it for the GUI I have to :

                            77a43472-f7bf-4286-a28d-d96395bd02f3-image.png

                            (the https port 443 can be different)

                            but first, the SAN of the certificate has to match the host name :

                            2abc53d4-11e1-4c5d-9a2f-8dc55caaabf0-image.png

                            No "help me" PM's please. Use the forum, the community will thank you.

                            B 1 Reply Last reply Reply Quote 1
                            • B Offline
                              bookie56 @Gertjan
                              last edited by

                              @Gertjan Hi....been busy today...It is cottage season and I am working on that for the next few weeks😊
                              I have got my wildcard working and directing to my duckdns.org domain...
                              One thing I am not sure about is dns resolver...
                              DNS-Resolver was set to my old certificate so I changed that and then things worked - but I am not certain what changes I need to make there...?
                              I have added /etc/rc.restart_webgui...
                              Still not sure about accessing my computers...but will have a look at that when I get a mo...
                              Thanks so much for your help!

                              bookie56

                              GertjanG 1 Reply Last reply Reply Quote 0
                              • GertjanG Offline
                                Gertjan @bookie56
                                last edited by

                                @bookie56 said in SSl certificates for all home network:

                                One thing I am not sure about is dns resolver..

                                Because you've set this :

                                2e2e6d54-9787-4e8d-bcd7-8e62edf4fec2-image.png

                                have a look at the /etc/hosts filer, the very first 4 lines.

                                You can now, from any LAN device in your network, do this :

                                C:\Users\Gauche>ping -4 your-domain-at.duckdns.org
                                
                                Envoi d’une requête 'ping' sur your-domain-at.duckdns.org [192.168.1.1] avec 32 octets de données :
                                Réponse de 192.168.1.1 : octets=32 temps<1ms TTL=64
                                

                                @bookie56 said in SSl certificates for all home network:

                                DNS-Resolver was set to my old certificate so

                                This one :

                                223bc2c8-49b4-4522-ba59-8f9dd0797472-image.png

                                ?
                                DNS = Unbound doesn't deal with certificates.
                                If you want to have "DNS over TLS" on port 853 on your LAN, you can set that certificate.
                                But why bother ? You don't trust your own LAN ? ^^
                                I've set it to active, true, bit I'm pretty sure none of my LAN devices is using it. My DNS traffic is all 'port 53' locally.

                                @bookie56 said in SSl certificates for all home network:

                                I have added /etc/rc.restart_webgui..

                                Normal. When the certificate gets renewed, then the web server using that certificate needs to be told that it changed. Restating the pfSense GUI web server is the way doing so.

                                Check that you've set :

                                47f1ccfa-4a00-47b3-a9a7-bd6120106a97-image.png

                                on the resolver settings page.

                                Keep in mind that "your-domain-at.duckdns.org" on your LAN will resolve to the pfSense LAN IP.
                                On the other side = WAN = the Internet, it will resolve to whatever WAN ISP IP you have.

                                No "help me" PM's please. Use the forum, the community will thank you.

                                B 1 Reply Last reply Reply Quote 0
                                • B Offline
                                  bookie56 @Gertjan
                                  last edited by

                                  @Gertjan Yes, I have pfsense with the new cert and can login no problems from all Windows computers - but not omv computers.... I just can't seem to be able to get to them with https working...
                                  Getting a line through https - but I can see the certificate is active...but not giving secure ssl....

                                  Must be missing something....

                                  bookie56

                                  1 Reply Last reply Reply Quote 0
                                  • stephenw10S Offline
                                    stephenw10 Netgate Administrator
                                    last edited by

                                    You shouldn't have to use HAProxy for this. Just use ACME to pull in a cert and use that for the webgui. Everything should see that as valid against the root trusted CAs. Unless they are using some subset or are out of date.

                                    What are those clients showing as invalid for the cert?

                                    B 1 Reply Last reply Reply Quote 0
                                    • B Offline
                                      bookie56 @stephenw10
                                      last edited by

                                      @stephenw10 not using HAProxy at all not been able to get anything working...
                                      On my OMV servers I have added enable ssl and I have imported the key and certificate....but when I reload it shouldn't use the ip address...I thought it should use the name of the computer and in this case DN-Storage1..
                                      My domain name via duckdns.org is pagenygard which I thought I would need to add as part of the address but nada....

                                      bild-2.png bild-3.png

                                      I am just thinking as you say an there must be an easier way?

                                      bookie56

                                      johnpozJ 1 Reply Last reply Reply Quote 0
                                      • stephenw10S Offline
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        If you're using ACME/LetsEncrypt you don't need to import anything into the client. Any recent OS will already trust the root CA used by LE. That's the whole point of using it.

                                        I would guess that you're trying to access it using a hostname that doesn't match the cert. I don't see 'dn-storage5' listed there.

                                        Try accessing it using the full FQDN.

                                        B 1 Reply Last reply Reply Quote 0
                                        • B Offline
                                          bookie56 @stephenw10
                                          last edited by

                                          @stephenw10 sorry don't understand...
                                          I have created a wildcard for pfsense that is for pagenygard.duckdns.org...
                                          I can access webui for pfsense - but how do I use the certificate to access other computers on my network with https....at the moment that isn't working ...
                                          I don't understand how importing the key and certificate would have any information about dn-storage5?

                                          bookie56

                                          stephenw10S 1 Reply Last reply Reply Quote 0
                                          • johnpozJ Online
                                            johnpoz LAYER 8 Global Moderator @bookie56
                                            last edited by johnpoz

                                            @bookie56 couple of things, the hostname only dn-storage5, sure isn't going to match a cert. Also your cert should have san values. not just a CN

                                            So here is a domain I use with a wildcard, the CN is just the domain.tld, then there are 2 san entries

                                            *.domain.tld
                                            domain.tld

                                            cert.jpg

                                            An intelligent man is sometimes forced to be drunk to spend time with his fools
                                            If you get confused: Listen to the Music Play
                                            Please don't Chat/PM me for help, unless mod related
                                            SG-4860 26.03 | Lab VMs 2.8.1, 26.03

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