redirect issues/too many retries only from mobile device?
-
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?
-
@NOTORIOUS_VR said:
I have HAPROXY hanlding SSL certs for selfhosted applicationsSame 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.
-
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:

frontend:

DNS Resolver to override the host for local LAN:

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:

From the browser:

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

-
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

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.

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?
-
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.
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.
-
@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..

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.
-
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.
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 LoginPrivacy Policy · Cookie Policy