Quote from: Patrick M. Hausen on August 31, 2025, 10:40:12 PMI use different DNS names for services - going to the reverse proxy - and the hosts that run these services - going to the internal IP address.
- service.mydomain.com for application
- service.internal.mydomain.com to commect via SSH, database connections, whatever
Also Avahi can help with that.
Use https://myservice.mydomain.com in your browser, reverse proxy can do the letsencrypt magic and you do not need a port number. Use ssh myservice.local for admin access.
Works across OPNsense and different subnets with mdns-repeater.
Yeah thanks, I've realized now that what I wanted is pretty much impossible to do cleanly. And I for sure want one domain that goes to reverse proxy as is to be used with browsers and another domain to be used by other protocols to resolve just the ip of the service. I will go with this setup.
Although the original problem remains, that I need a dns override *.mydomain.com -> reverse proxy, but then when I have e.g. blog.mydomain.com (which is not hosted locally, but somewhere on the internet), it's an issue to access it. But well, I was able to get past that issue by the hack @Monviech suggested (reverse proxy points blog.mydomain.com -> blog.mydomain.com, but just doesn't use my DNS to resolve it)