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

    Please help to configure HAProxy to serve certifficate on internal LAN too

    Scheduled Pinned Locked Moved Cache/Proxy
    20 Posts 4 Posters 127 Views 5 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.
    • tinfoilmattT Offline
      tinfoilmatt @ha11oga11o
      last edited by

      @ha11oga11o I suspect your DHCP configuration.

      H 1 Reply Last reply Reply Quote 0
      • H Offline
        ha11oga11o @tinfoilmatt
        last edited by

        @tinfoilmatt

        Nothing there that i can see. Nothing is added all is actually unticked. Only i tweaked was long time ago to define static pool and thats it.

        Untitled4.png

        tinfoilmattT 1 Reply Last reply Reply Quote 0
        • tinfoilmattT Offline
          tinfoilmatt @ha11oga11o
          last edited by

          @ha11oga11o What version of pfSense is this system running?

          H 1 Reply Last reply Reply Quote 0
          • H Offline
            ha11oga11o @tinfoilmatt
            last edited by

            @tinfoilmatt

            2.8.1-RELEASE (amd64)
            built on Thu Aug 28 18:09:00 CEST 2025
            FreeBSD 15.0-CURRENT

            haproxy net 0.63_11

            Fair question. I did not found it important because one should not seek advices at forums if at least box is not upto date.

            H 1 Reply Last reply Reply Quote 0
            • H Offline
              ha11oga11o @ha11oga11o
              last edited by

              I changed this from manual to automatic and got different response from dig.

              Untitled5.png

              it went from

              ;; ANSWER SECTION:
              nextcloud.xxx. 3600    IN      A       192.168.1.214
              nextcloud.xxx. 3600    IN      A       192.168.1.1
              
              

              to

              ;; ANSWER SECTION:
              nextcloud.xxx. 3600    IN      A       192.168.1.1
              nextcloud.xxx. 3600    IN      A       192.168.1.214
              
              

              They switched place, but still it redirects same.

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

                @ha11oga11o you are prob registering dhcp in unbound. Or you are registering statics if you have a reservation which is why your seeing both.

                Look in your unbound settings - do you have this checked?

                dhcp.jpg

                Is then yeah you would have your host override you created and also the dhcp entry - which is why you would get 2 answers.. And yeah they could flip flop with .1 being first one query, and .214 being first next query, or 3 queries latter etc..

                This is one of the perfect examples of why you shouldn't use your pubic domain internally.. Then you never can run into such problems.

                I have multiple public domains where I can point records at my public IP.. But I use home.arpa internally.

                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 25.07.1 | Lab VMs 2.8.1, 25.07.1

                H 1 Reply Last reply Reply Quote 0
                • H Offline
                  ha11oga11o @johnpoz
                  last edited by

                  @johnpoz
                  Yes, it seems i have. Should i uncheck it?

                  Untitled6.png

                  Are other things ok?

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

                    @ha11oga11o you can uncheck that - but you would then loose ability to resolve any resources internally unless you create host overrides for them.

                    Or set reservations for them and register those.

                    See my edit of previous post - not a fan of using the same domain public and internal if you are going to have stuff on that domain that resolves on the public side - I would suggest you just use say home.arpa as your internal name - then you would never run into such an issue.

                    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 25.07.1 | Lab VMs 2.8.1, 25.07.1

                    H 1 Reply Last reply Reply Quote 0
                    • H Offline
                      ha11oga11o @johnpoz
                      last edited by

                      @johnpoz

                      Mine goal is only to be able to use nextcloud.mydomain.xx both outside and inside LAN.
                      Outside all works fine. As i understand if im at local LAN with phone we will not be able to resolve nextcloud.mydomain.xx. It will be not reachable?
                      That is different issue with same outcome then.
                      We are in need to be able to use it out and in house without VPN fiddling.

                      I did create host override. You can see on posts above. I did place bunch of pictures. Is that what you are talking about?

                      Thanks!

                      H 1 Reply Last reply Reply Quote 0
                      • H Offline
                        ha11oga11o @ha11oga11o
                        last edited by ha11oga11o

                        oh yeah, 192.168.1.214 is static bounded with its MAC address.

                        I untick both DHCP Registration and Static DHCP registration and now dig returns only 192.168.1.1 but i cant access it from LAN anymore. I do have Host override as posted in pics above. But we cannot resolve it anymore.
                        Is there anything else i need to do so we gain access to nextcloud.mydomain.xx within local LAN?

                        Guys, thank you in advance.

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

                          @ha11oga11o if you resolve nextcloud.mydomain.xx to your external IP, ie the same one public people do then it would be handled by your haproxy.

                          Example I have ssl offloading for external users for the public fqdn something.mydomain.tld - this resolves externally to my public IP that hits pfsense wan, this also resolves to my public IP when on my local network, so again haproxy handles the ssl, etc.

                          But if I wanted or needed to access that directly on my local lan then I use its name.home.arpa:port that the service is on that doesn't do ssl, etc.

                          What is the point of using the same fqdn internally and externally? What do you think that gets you other than issues?

                          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 25.07.1 | Lab VMs 2.8.1, 25.07.1

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