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

HA Proxy / Acme Lets encrypt : LAN access problem from inside with external url https

Scheduled Pinned Locked Moved Firewalling
32 Posts 2 Posters 1.4k 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.
  • J
    johnpoz LAYER 8 Global Moderator @ducati57
    last edited by Oct 13, 2023, 1:38 PM

    @ducati57 well you could set your local dns to resolve these public fqdn to your pfsense wan IP, vs public IP that is being reflected by your edge device.

    That way vs going to your edge device to be reflected back in, they would hit your pfsense wan where haproxy would direct them where to go.. I do the same sort of haproxy ssl offload sort of setup.. But in my case my public IP is on my pfsense wan. So when my clients behind pfsense want to go there, they just hit the pfsense wan IP coming in from the lan side which is allowed.

    You could setup a simple override or multiple if you have multiple different fqdns so your local devices using pfsense as their dns would resolve them to your pfsense wan IP..

    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 24.11 | Lab VMs 2.8, 24.11

    D 1 Reply Last reply Oct 13, 2023, 2:09 PM Reply Quote 0
    • D
      ducati57 @johnpoz
      last edited by ducati57 Oct 13, 2023, 2:10 PM Oct 13, 2023, 2:09 PM

      @johnpoz

      Here are the DNS currently used by Pfsense, the whole thing is attached to the WAN interface 10.1.1.1.

      Provider: primary 194.158.122.10 Secondary 194.158.122.15
      Google : primary 8.8.8.8 Secondary 8.8.4.4

      J 1 Reply Last reply Oct 13, 2023, 2:10 PM Reply Quote 0
      • J
        johnpoz LAYER 8 Global Moderator @ducati57
        last edited by Oct 13, 2023, 2:10 PM

        @ducati57 don't matter what pfsense is using - matters that your clients are pointing to pfsense for theirs.

        also - you could set those all you want, pfsense out of the box resolves. So unless you went in and enabled forwarding mode, unbound on pfsense just resolves.

        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 24.11 | Lab VMs 2.8, 24.11

        D 1 Reply Last reply Oct 13, 2023, 2:17 PM Reply Quote 0
        • D
          ducati57 @johnpoz
          last edited by Oct 13, 2023, 2:17 PM

          @johnpoz

          Is there a tutorial for making the modification ? Because if I understand correctly, it is necessary to make the modification on each client or on Pfsense?

          I am not an "expert" in the IT / Firewall part, I work in the telecom (backbone / longhaul) fiber optic sector :)

          J 1 Reply Last reply Oct 13, 2023, 2:31 PM Reply Quote 0
          • J
            johnpoz LAYER 8 Global Moderator @ducati57
            last edited by johnpoz Oct 13, 2023, 2:33 PM Oct 13, 2023, 2:31 PM

            @ducati57 so out of the box if you enable dhcp on pfsense it would hand out its own IP to any dhcp clients. Unless you don't have unbound or dnsmasq running on pfsense. Then it would hand out the dns you have set in general.

            To be honest, this is out of the box for most users - nothing really to do.

            You would just need to create the host overrides in unbound (resolver).. example here is somee host overrides I have setup

            overrride.jpg

            So when my clients ask pfsense for dns, it returns my local IP.. Vs the public IP you would get if you asked public dns

            $ dig @8.8.8.8 time.nist.com +short
            208.91.197.27
            
            $ dig time.nist.com +short
            192.168.3.32
            
            $ dig time-ios.apple.com +short
            192.168.3.32
            
            $ dig @8.8.8.8 time-ios.apple.com +short
            time.g.aaplimg.com.
            17.253.26.123
            17.253.6.125
            17.253.26.251
            
            

            So now clients wanting to look up those fqdn, instead of going to the public IP (your edge).. They would just go to your pfsense wan IP and haproxy would proxy them to where you have setup.. In my case they just ask my local ntp server vs the ntp servers on the public internet.

            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 24.11 | Lab VMs 2.8, 24.11

            D 1 Reply Last reply Oct 13, 2023, 4:25 PM Reply Quote 0
            • D
              ducati57 @johnpoz
              last edited by ducati57 Oct 13, 2023, 4:31 PM Oct 13, 2023, 4:25 PM

              @johnpoz

              Here are the basic DNS on Pfsense.
              c4dd5afe-f48e-4d3c-8dfa-54f5f4322bef-image.png

              I will make the modifications as you detailed previously and post a screenshot.

              2bbd8c25-a83c-4c08-901e-c5b3649844e1-image.png

              J 2 Replies Last reply Oct 13, 2023, 4:29 PM Reply Quote 0
              • J
                johnpoz LAYER 8 Global Moderator @ducati57
                last edited by Oct 13, 2023, 4:29 PM

                @ducati57 yeah - you already stated that.. Not sure what else you want me to say? Out of the box unbound doesn't even use those.. Unless you specifically setup unbound to forward.

                forward.jpg

                And it doesn't matter what pfsense does be it resolve for forward.. If your client, ie some pc on your network is asking pfsense for dns.. And you setup a host override then that is the new iP that would be handed to the client for the fqdn it asked for.

                If your pc is using say 8.8.8.8 or any of those you listed for dns directly - then no a host override wouldn't work, because the client is never asking pfsense to resolve anything anyway.

                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 24.11 | Lab VMs 2.8, 24.11

                D 1 Reply Last reply Oct 13, 2023, 4:32 PM Reply Quote 0
                • D
                  ducati57 @johnpoz
                  last edited by Oct 13, 2023, 4:32 PM

                  @johnpoz

                  So here is the modification to be made, directly on the LAN/DHCP server?
                  206cd0aa-98fd-48c4-a0e2-dec56e7995d9-image.png

                  1 Reply Last reply Reply Quote 0
                  • J
                    johnpoz LAYER 8 Global Moderator @ducati57
                    last edited by Oct 13, 2023, 4:35 PM

                    @ducati57 You don't need to put anything in there..

                    Out of the box pfsense will ask itself (unbound) for dns - which resolves..

                    dns.jpg

                    You only need to put those in - if you want pfsense to use them, or you want to forward to them from unbound, etc. I have zero use for any external dns provider since I just let unbound resolve, as it does by default anyway..

                    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 24.11 | Lab VMs 2.8, 24.11

                    D 1 Reply Last reply Oct 13, 2023, 4:46 PM Reply Quote 0
                    • D
                      ducati57 @johnpoz
                      last edited by Oct 13, 2023, 4:46 PM

                      @johnpoz Ok, thanks for your patience :)

                      I just modified it as indicated in your comment.=>

                      e93b85d2-b5e3-487b-9ddd-fe9727f5eb35-image.png

                      J 1 Reply Last reply Oct 13, 2023, 4:47 PM Reply Quote 0
                      • J
                        johnpoz LAYER 8 Global Moderator @ducati57
                        last edited by Oct 13, 2023, 4:47 PM

                        @ducati57 If that is pfsense IP, why would you set that and not just use loopback? Which is does all on its own..

                        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 24.11 | Lab VMs 2.8, 24.11

                        D 1 Reply Last reply Oct 13, 2023, 4:54 PM Reply Quote 0
                        • D
                          ducati57 @johnpoz
                          last edited by ducati57 Oct 13, 2023, 4:55 PM Oct 13, 2023, 4:54 PM

                          @johnpoz

                          If I do not indicate anything, and I configure Pfsense identical to your screenshot, here is the result
                          (KO update status because no external access because no DNS?)

                          70dc209e-fbc0-4b2f-be78-f5597a0886a9-image.png

                          J 1 Reply Last reply Oct 13, 2023, 5:05 PM Reply Quote 0
                          • J
                            johnpoz LAYER 8 Global Moderator @ducati57
                            last edited by Oct 13, 2023, 5:05 PM

                            @ducati57 did you modify unbound settings?

                            unbound.jpg

                            By default its ALL, did you change it and not include localhost?

                            Is unbound running even?

                            services.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 24.11 | Lab VMs 2.8, 24.11

                            D 1 Reply Last reply Oct 13, 2023, 5:16 PM Reply Quote 0
                            • D
                              ducati57 @johnpoz
                              last edited by ducati57 Oct 13, 2023, 6:05 PM Oct 13, 2023, 5:16 PM

                              @johnpoz

                              Here is the configuration of the different elements / services do you see an error? (security problem, loop, bug, useless,etc..)

                              c2572561-1f74-4874-9695-4e42891ad506-image.png

                              J 1 Reply Last reply Oct 13, 2023, 8:00 PM Reply Quote 0
                              • J
                                johnpoz LAYER 8 Global Moderator @ducati57
                                last edited by Oct 13, 2023, 8:00 PM

                                @ducati57 well I see one thing that I personally would not do.. If your going to set the specific interfaces that unbound listens on, why would you click on wan.. Do you have devices that would be using the dns via its wan IP?

                                Your saying with those settings it does not populate 127.0.0.1 in the system tab for dns? If you do not put anything in the dns tab?

                                Here I just fired up my 2.7 box.. Its pretty much default out of the box.. Other than changing its lan to other than the default 192.168.1.1

                                default.jpg

                                I then changed from all, to just lan and got this error

                                loop.jpg

                                So I selected localhost along with just lan and it worked and system still shows dns as loopback 127.0.0.1

                                update.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 24.11 | Lab VMs 2.8, 24.11

                                D 1 Reply Last reply Oct 14, 2023, 7:41 AM Reply Quote 0
                                • D
                                  ducati57 @johnpoz
                                  last edited by Oct 14, 2023, 7:41 AM

                                  @johnpoz
                                  Good morning,

                                  I just made the modification, it's gone.
                                  c26bbc6c-c5fb-403d-afb4-cfaffd85b237-image.png

                                  However still no local LAN access via HTTPS from an external url

                                  J 1 Reply Last reply Oct 14, 2023, 11:32 AM Reply Quote 0
                                  • J
                                    johnpoz LAYER 8 Global Moderator @ducati57
                                    last edited by Oct 14, 2023, 11:32 AM

                                    @ducati57 said in HA Proxy / Acme Lets encrypt : LAN access problem from inside with external url https:

                                    However still no local LAN access via HTTPS from an external url

                                    did you create you host overrides??

                                    Are you clients pointing to pfsense for dns?

                                    Do a simple dns query from a client - did it resolve your fqdn to pfsense wan IP? Vs the public.. Maybe your browser is using doh for dns? Vs pointing to pfsense IP for it.

                                    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 24.11 | Lab VMs 2.8, 24.11

                                    D 1 Reply Last reply Oct 14, 2023, 4:38 PM Reply Quote 1
                                    • D
                                      ducati57 @johnpoz
                                      last edited by ducati57 Oct 14, 2023, 4:42 PM Oct 14, 2023, 4:38 PM

                                      @johnpoz Yes, here is the conf for "Host Overrides"

                                      af710cb1-a255-4082-a544-e68238ef384e-image.png

                                      Yes, here is my PC (wifi) where it is visible in DNS (Pfsense) in 192.168.1.1

                                      ec4edc7e-e4fd-437e-849b-d559ac7912a2-image.png
                                      b2ee527c-8393-4da8-adeb-818b979ed588-image.png

                                      J 1 Reply Last reply Oct 14, 2023, 4:45 PM Reply Quote 0
                                      • J
                                        johnpoz LAYER 8 Global Moderator @ducati57
                                        last edited by johnpoz Oct 14, 2023, 4:48 PM Oct 14, 2023, 4:45 PM

                                        @ducati57 so your nslookup for dom.namedomaine.ovh returns 192.168.1.21

                                        do your nslookup dom.namedomaine.ovh

                                        What does it reply with - if that works and your still going to the public in your browser - you sure your browser isn't using doh vs your local dns.

                                        And that is not the right override anyway - if you want it to bounce off pfsense wan IP running haproxy, then it should be to pfsense wan IP.. Not the actual host IP the site is running on.

                                        haproxy.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 24.11 | Lab VMs 2.8, 24.11

                                        D 1 Reply Last reply Oct 14, 2023, 5:03 PM Reply Quote 1
                                        • D
                                          ducati57 @johnpoz
                                          last edited by ducati57 Oct 14, 2023, 5:09 PM Oct 14, 2023, 5:03 PM

                                          @johnpoz said in HA Proxy / Acme Lets encrypt : LAN access problem from inside with external url https:

                                          do your nslookup dom.namedomaine.ovh

                                          A test from my laptop :

                                          27498b4b-0fea-4454-b9f8-3c8358a14eed-image.png

                                          A direct test of the VM on my ESXI :

                                          907e6ebb-49a5-4ae2-81c3-6e2a8259af45-image.png

                                          J 1 Reply Last reply Oct 14, 2023, 5:22 PM Reply Quote 0
                                          15 out of 32
                                          • First post
                                            15/32
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received