I have an openwrt router at home which also acts as my home server. It’s running a bunch of services using docker (Jellyfin, Nextcloud, etc.)
I have set up an SSH tunnel between my openwrt router and VPS and can access jellyfin successfully.
I understand that I need to set up a reverse proxy to access multiple services and have https.
But I’m confused if I should set up this reverse proxy on the VPS or on the router itself. Is nginx the easiest option? Should i add subdomains in cloudflare for every service?
Pease don’t recommend vpns since they are all blocked where i live (wireguard, tailscale openVPN, etc.) I’m limited to using ssh tunneling only.
Thanks
If you are new i recommend “Caddy V2”
It is by far the easiest.
Wait with Nginx until you’re better. (and even then, use linuxserverio/swag instead of nginx)
As someone who used caddy over years, I can’t completely agree.
Caddy has some downsides (nextcloud needs special setup for example) and not everyone is familiar with writing a Caddyfile. (Json)
For someone new I would recommend “nginx proxy manager”. Easy to install with docker and self explained through GUI.
i actually think NPM is more confusing. 1: there are practically always already finished Files for Caddy V2. Most of the times directly in the Repo of the Project. A lot of Devs use Caddy themselves. 2: NPM exposes a lot of Options additionally. This can confuse newcomers. With Caddy, all these extra options are invisible. you just write and see “reverse_proxy jellyfin” and that’s it.
Usually a reverse proxy runs behind the firewall/router. The idea you are pointing 80/443 at the proxy with port forwarding once traffic hits your router.
So if someone goes to service.domain.com
You would have dynamic DNS telling domain.com the router is the IP.
You would tell domain.com that service.domain.com exists as a cname or a record. You could also say *.domain.com is a cname. That would point any hosttname to your router.
From here in the proxy you would say service.domain.com points to your services IP and port. Usually that is would be on the lan but in your case it would be through a tunnel.
It is possible and probably more resource efficient to just put the proxy on the VPS and point your public domain traffic directly at the VPS IP.
So you could say on the domain service.domain.com points to the VPS IP as an a record. Service2.domain.com points to the VPS IP as another a record.
You would allow 80/443 on the VPS and create entries for the services
Those would look like the service.domain.com pointing to localhost:port
In your particular case I would just run the proxy on the public VPS the services are already on.
Don’t forget you can enable https certificates when you have them running. You can secure the management interface on its own service3.domain.com with the proxy if you need to.
And op consider some blocklists for your vps firewall like spamhaus. It wouldn’t hurt to setup fail2ban either.
Check “boring proxy” On github easy to install and configure and does https for you
I should also add something that lots of beginners miss.
The reverse proxy does not care what the domains that you define in it actually resolve to. It receives the domain name as a HTTP header which is completely at the whim of the client. As long as that domain name matches one of the domains defined in the proxy, it’s all good.
You can successfully connect to a proxy with a domain name defined in the domain owner’s DNS, or you can make up your own DNS that says whatever you want, or you can define any domain->IP association you want in your hosts file, or you can simply use curl or wget to connect directly to the proxy IP and lie about the domain in the HTTP headers without having it resolve in any DNS.
This means that yes, the proxy will happily serve your “private” *.local.example.com services to someone connecting from outside your LAN. All they have to do is figure out (or guess) your subdomain names. You need to add IP restrictions in the proxy (default deny from all + lan ip mask explicit exception) if you really want those services to be restricted to the LAN.
DNS is not security, it’s a public service that maps domains to IPs.
TLS is only security in the sense it protects the connection en route from eavesdropping, but it doesn’t restrict access.
Firstly…why are you routing your home stuff through a VPS? I’m confused on what is happening here.
If you just want to access your things remotely, setup a VPN server on the router, and connect to it that way. You also dont need a reverse proxy or SSL if you’re already accessing things over a secured connection. Where did you get this info from?
How can something like Tailscale be blocked?
Unfortunately, Deep Packet Inspection does this as Tailscale/Wireguard does not encrypt trafficMy bad, it encrypts traffic, but I mean easily readable signature
Wireguard, like all VPNs, definitely does E2E encryption. What would be the point of an unencrypted VPN?
https://www.wireguard.com/protocol/
Looks like wireguard encrypts traffic to me.
It’s easily detected by firewalls in China and Iran.
Interesting, because Tailacale doesn’t use any special ports. How would that be detected? And could you maybe use Headscale on a dynamic port to circumvent that?
Wireguard is blocked at protocol level no matter which port you use. Tailsclale uses wireguard. Haven’t tried headscale yet.






