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

    redirect issues/too many retries only from mobile device?

    Scheduled Pinned Locked Moved Cache/Proxy
    7 Posts 2 Posters 303 Views 2 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.
    • N
      NOTORIOUS_VR
      last edited by

      I'm completely lost and have no idea where to even start looking for my issues.

      I have HAPROXY hanlding SSL certs for selfhosted applications, I can access everything fine from outside and inside my network using the hostnames - except it seems from mobile devices and things like nividia shield/chromecasts which are on my native subnet!

      If I test from a laptop or computer (wired or wifi) on the same subnet everything works as expected.

      The only thing I can think of is that I have an issue with the way I am redirecting my DNS reslover to point to my fpsense box so that when I hit my hostname for the services it doesn't go out to the internet?

      But again, why is it only these few devices?

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

        @NOTORIOUS_VR said:
        I have HAPROXY hanlding SSL certs for selfhosted applications

        Same here.. SSL offload for apps that make it difficult to setup their own ssl, etc.

        So for example I have a seerr running on a docker on my nas http://192.168.9.10:5055

        This is a backend on haproxy. On the frontend, that listens on my wan IP on 443.

        So the public fqdn I use points to my wan IP. So any client can be it outside or inside that uses that fqdn resolve to my wan ip.

        So more details of your setup could help us figure out what is going wrong. What are doing with dns on these different clients? All my clients point to my pihole, which forwards to pfsense where the resolver is running, which resolves that fqdn via public dns to my 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 26.07 | Lab VMs 2.9.0, 26.07

        N 1 Reply Last reply
        Reply Quote 0
        • N
          NOTORIOUS_VR @johnpoz
          last edited by

          @johnpoz

          My setup is similar except the part where I use the DNS resolver in pfsense to redirect to it's internal IP instead of going out to the WAN (and to be honest I don't know if what I'm doing for that is correct, but it works).

          Here an example for lidarr (also running on an LXC in docker):

          HAproxy backend:
          image.jpeg

          frontend:
          image.jpeg

          DNS Resolver to override the host for local LAN:
          image.jpeg

          My DNS setup is simple, clients point to 2x Windows Server for DNS and they forward to pfsense for anything they don't know and then pfsense out to external DNS services (ie. google dns).

          From any PC/server/whatever, I can access my services without issue, ping, traceroot all complete as expected:
          image.jpeg

          From the browser:
          image.jpeg

          Unfortunately from say my phone, or nvidia shield/chromecasts it fails miserably:
          image.jpeg

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

            @NOTORIOUS_VR said:

            My setup is similar except the part where I use the DNS resolver in pfsense to redirect to it's internal IP instead of going out to the WAN (and to be honest I don't know if what I'm doing for that is correct, but it works).

            That works fine if your where you going it either https or http in both places and would be better than off a proxy to be honest.

            Split dns - where host.publicdomain.tld resolves to your public IP say 1.2.3.4 outside which you forward or proxy into your host at say 10.10.0.254 Inside your network you resolve host.publicdomain.com just directly to 10.10.0.254

            But your error there about not supporting secure points to going to something https:// that isnt actually https

            If I tried and hit my seer instance on 443 there is nothing listening and if I hit its port via https - then yeah going to get the same sort of error

            https://192.168.9.10:5055

            Secure Connection Failed
            
            An error occurred during a connection to 192.168.9.10:5055. SSL received a record that exceeded the maximum permissible length.
            

            SSL offload where your proxy handles the ssl - why do you have a CA setup in your backend if its not doing ssl?

            If your dealing with ssl that you want haproxy to do - you shouldn't really bother with split dns and just resolve your fqdn to the public and let haproxy handle the ssl and just talk to your client via normal http.

            If you want to do split dns - then your backend needs to handle the ssl as well.

            If I want to talk to my seer instance without bouncing off the proxy - I would just access it via a local fqdn nas.home.arpa in my example, or just the ip http://nas.home.arpa:5055

            seerr.jpg

            If your going to haproxy do the ssl and also talk to your backend via ssl, then yeah haproxy needs to trust that cert - but that is not going to work with lets encrypt because you can not add rfc1918 IPs in the certs as a san. So you can't use the IP like you have there in the backend, etc.

            ip.jpg

            You can skin this cat multiple ways.. But if you already have haproxy already setup for outside use - simple solution is just do not resolve this public fqdn to an internal address - and just hit your haproxy be it your inside or outside via your public ip.

            I am a fan of split dns method - but sometimes it just doesn't make sense, or easier to just bounce off the proxy be internal or external. If you were just port forwarding and your cert was setup on the service internally then sure split dns. But if use acme for your certs, its easier to just let haproxy handle the ssl. And just talk to the backend over http - you could set certs up in both your haproxy and your service - but why duplicate effort?

            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.07 | Lab VMs 2.9.0, 26.07

            N 1 Reply Last reply
            Reply Quote 0
            • N
              NOTORIOUS_VR @johnpoz
              last edited by NOTORIOUS_VR

              @johnpoz

              I appreciate the reply, but I honestly can't seem to follow most of what you said.

              And again, this is only an issue on well what seems to be android based devices now that I think of it when inside the my network, otherwise outside they work fine (like when I use cellular data).

              It is clear that this is an issue with SSL somehow. What I do not understand is why and why only with these specific devices.

              Why does my PC/laptop and even apps on my phone (like homeassistant, etc) not have an issue, but only through the browser on my mobile?

              I see no reason to have to use an internal fqdn or the IP address for my servces when I have a perfectly usable fqdn that is SSL'd - that makes no sense to me just as it makes no sense to go out to the internet to just come back in again? Maybe I'm misunderstanding however.

              Right now HAproxy handles/serves CA certs for all my self hosted apps, they ALL works as expected inside and out - except for these few devices.

              @johnpoz said:

              If your going to haproxy do the ssl and also talk to your backend via ssl, then yeah haproxy needs to trust that cert - but that is not going to work with lets encrypt because you can not add rfc1918 IPs in the certs as a san. So you can't use the IP like you have there in the backend, etc

              what cert are you talking about here? most of my services are http and not https (locally), HAproxy/cloudflare is issuing the certs for each service. Again maybe I am misunderstanding what you wrote, but I have to say that I have been running a reverse proxy (caddy first and now HAproxy) for a long time and never, ever seen this issue before.

              I only became aware of it recently and I'm not exactly sure why I'm having this issue now. As far as I know nothing changed on my end (but clearly something did), as before this was NOT an issue.

              I'm almost thinking about restoring a pfsense backup from before I patched CE for the php scare recently to see if that did anything strange.

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

                @NOTORIOUS_VR stop doing split dns and your problem goes away.

                It has zero to do with the php fix.

                services are http and not https (locally),

                Most browsers will only go to https to a fgdn, and for sure once they have gone there before. After looking at this warning again..

                warning.jpg

                Its warning you your not using https. So use https via your haproxy.

                Caddy sure wasn't running on pfsense - so was that running on the same host you are running your services on. So your split dns would always just go to the the IP of your proxy.

                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.07 | Lab VMs 2.9.0, 26.07

                N 1 Reply Last reply
                Reply Quote 0
                • N
                  NOTORIOUS_VR @johnpoz
                  last edited by NOTORIOUS_VR

                  @johnpoz said:

                  Its warning you your not using https. So use https via your haproxy.

                  I know that it is - however the site/service is using https via HAproxy and the CA for each site is served by HAproxy and works on everything except these few devices.

                  Also this issue wasn't always there, I was able to access these sites correctly from these devices at some point before.

                  1 Reply Last reply
                  Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • First post
                    Last post
                  Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
                  Privacy Policy · Cookie Policy