I use this setup and don’t terminate SSL at the VPS and solely tunnel the encrypted traffic over a wire guard tunnel to the home lab where SSL is terminated.
The VPS solely serves to move the traffic from an external IP to an internal one.
It’s possible that someone could log into my server, change the nginx config to terminate SSL and then siphon data but it would take a few steps and can be somewhat mitigated by stapling the SSL certs that should be seen from the homelab.
hank_and_deans@lemmy.ca 2 days ago
Or just use Nginx stream proxy, and all the encryption happens on the endpoints. No need for certs on the proxy at all.
This is how I make https and mqtts available on ipv4.
2xsaiko@discuss.tchncs.de 1 day ago
Oh interesting, I’ll have to look into that. Is this with that “proxy protocol” I’ve seen mentioned? If not, does this preserve it pass through the client socket address?
hank_and_deans@lemmy.ca 1 day ago
It’s merely a tcp proxy. It doesn’t even have to be http since it has no idea. The trick with tls is that it can extract the requested host name via SNI.
2xsaiko@discuss.tchncs.de 1 day ago
Hm, okay, that does sound like the real client IP will get lost and every connection will appear to come from the proxy then. It would be good if that were passed somehow. My current setup adds the X-Forwarded-For header for example.