For the very first time i tried to selfhost a static site (lighttpd + duckdns) but I’ve failed… Is it even possible to selfhost a static site from “router 2” while i’m behind two routers? “Router 1” is from ISP and i have no possibility to change any settings except subnet, standard gateway, dhcp on/off and DMZ. -> no port forwarding. "Router 2 is Asus with port-forwarding available and i’m using an OpenVPN configuration on it (if that matters). DuckDNS could see the external ip from R2, but i couldn’t access it.
Yes. DMZ on router 1 exposes router 2 IP to internet.
This right here. Since you can’t really configure the ISP router (1), DMZ is the way to go. The DMZ feature on home routers usually allows you to select a specific device or devices to add to the DMZ so make sure to reserve/set a static IP on your router (2) and configure the DMZ on your ISP router (1) to include only that specific IP. DMZ essentially forwards all ports to that device.
Either DMZ on the first router, or bridge mode on the second.
I use cloudflare tunnel for this purpose. No open ports, no dealing with ISP, no exposing my IP.
yet some people might want less america in their setup and try to avoid services like that.
While this is true, the reader is really the only one that can choose for themselves and Cloudflare is a valid option, even if it isn’t the most purist method available.
Understandable. It’s compromise I’m ok with, so that’s why I mentioned this method.
I would use cloudflare pages (or any forge ‘pages’ feature) before using tunnels for a static website
I’m actually behind 3 routers and still hosting stuff to the internet. My house is behind cgnat, I have two isp routers, which both connect to a pfsense router (ip of which is in the dmz of each isp router).
My pfsense router and a free vps hosted at oracle are both connected via tailscale. Pfsense router advertises specific subnet addresses to the tailnet. VPS uses caddy to reverse proxy to those subnet addresses to expose them to the internet.
You’re going to get double NAT’d if you don’t have a proper passthrough. Is there a specific reason you have two routers setup like this?
Probably because the ISP modem/router has limited capability.
I’ve done 2 routers like this for years (out of laziness more than anything) because cable modem router suck from a capability standpoint.
The actual cable modem can run in passthrough mode though. Look up the model and find the docs. Should be a quick and easy change, or your ISP at least should able to change it. It would be absurd if not.
the ISP locked their router. I have to go the the ISP’s site, login and change settings there… can’t even change DNS on ISP-router.
That’s a bummer. Have you asked them about running it in passthrough mode?
No I haven’t. First i got to educate myself what these different modes are…