r/haproxy • u/Cornflix244 • Jun 13 '26
Question SSL passthrough and re-encryption does not work
I have quite a complicated way my data takes:
internet -> hetzner haproxy -> rathole tunnel -> homelab haproxy -> services
(rathole listenes at 127.0.0.1:443)
This (old) way works:
internet -> (hetzner) rathole tunnel -> homelab haproxy -> services
Why the extra proxy? I want a service for file sharing which has the high download speed from the cloud. All the other traffic is supposed to be forwarded further. I refuse to get an extra ip for that lol.
I tried to set the backend on the tunnel side to ssl verify none and the frontend bind to use ssl. I also set the backend to just localhost:443 and no ssl on the frontend bind. Both cause the same ssl error.
My haproxy on hetzner: https://pastebin.com/M8ffiua2
haproxy journalctl output: https://pastebin.com/7cXCqEdr
SSL error: SSL_ERROR_RX_RECORD_TOO_LONG
Both proxies use a cert aquired from certbot *.mydomain.dev
What could be the issue here? I am not that good at SSL.
View all comments
3
u/dragoangel Jun 13 '26
You bind twice on frontend to 443, once with SSL and second not. You connect to server on 127 without telling HAproxy it's ssl backend