Connecting to devices via just the domain rather than domain plus port on both VPN and LAN.
Connecting to devices via just the domain rather than domain plus port on both VPN and LAN.
Hello. You're trying to maintain consistent access across your LAN and VPN connections using the same domain name. Your current configuration uses Proxmox on 10.1.0.3 with different ports, and you're managing it through OpenWRT via a router. The goal is to allow seamless switching between VPN and LAN without changing the domain. For reference, your home server runs Proxmox and Haproxy, accessible at 10.1.0.3:443 or 8006. You've set up hostnames on the router for easier access through HTTPS. On the VPS side, you have a Pihole with Unbound configured. No LAN devices currently use VPN clients, and the router handles that forwarding. If you wish to redirect Proxmox webgui traffic from router.example.com:9999 to 10.1.0.3:8006 while staying on the same domain, consider using a reverse proxy or a load balancer setup that forwards requests based on the connection type. This way, whether you're connecting via LAN or VPN, your devices can reach the Proxmox service using the desired domain.
I attempted the setup with haproxy, but the problem is unclear—I need to know where homeserver.example.com should be defined and where it should point. I want multiple subdomains like nas.example.com and mc.example.com to all redirect to 10.0.0.2.
Set up virtual hosts for each service on your web server. Assign unique domain names and ports in each configuration file. Your current setup works internally, but you can extend it by creating separate vhosts for NAS, webserver, PHPMyAdmin, etc. Use a reverse proxy to route traffic to the appropriate service based on port or subdomain. Services can share ports as long as they have distinct folders on the server.
Would you mind sharing your haproxy.conf? Because if I understood that right, this should have worked?
I handle everything through Apache, which has its own proxy module. It’s been a while since I needed to make changes—I even forgot my password. I’m planning to fix it again but fear it might not go perfectly. Edit: Using Apache with mod_proxy should work this time. It forwards traffic from 127.0.0.1:8080 to sub.domain.com:443, and you can tweak the settings as needed. You likely don’t need the rewrite or socket adjustments; most sites don’t require them. Edit 2: Creating a non-SSL vhost on port 80 and then installing certbot seems to resolve past issues I faced when setting up SSL manually.
I'm dealing with a tricky situation. I wasn't able to get it running with Apache or Nginx last night, but I managed to work with HAProxy. Now I'm encountering another problem that interrupts the VPN connection. I configured OpenVPN on a VPS to only listen on WAN:443TCP, and set up proxmox.example.com to connect to 10.0.0.1 on the VPS. I also set up HAProxy to forward traffic from 10.0.0.1:443 to 10.0.0.2:9999, which routes to local 10.1.0.3:8006. When trying to access https://proxmox.example.com locally, the router blocks the VPN and doesn't allow manual reconnection. If I manually trigger the VPN on the router (which uses OpenWrt), I can briefly connect to proxmox.example.com, but I only see an SSL_ERROR_RX_RECORD_TOO_LONGSSL error before it drops again. It's unclear which service is causing this—it could be the router or the VPN itself. I'll try Apache one more time and see if you have any suggestions.
The only possible hint might be setting up a vhost on port 80 without SSL and checking connectivity. This usually occurs because SSL expects port 443 and rejects otherwise. Removing SSL temporarily could let you connect and verify your setup.
I made a really simple error, but I solved it using Nginx too. Trying to force the SSL setup. Thanks everyone!