Back to Blog
Homelab 4 min read

One Box, Too Many Jobs: Splitting My Public Web Host Off My DNS Resolver

I microsegmented everything on the network, then quietly ran a public Next.js app on the same kernel as the resolver every VLAN depends on. Here's the blast-radius problem — and why a second Pi only helps if it lands in the right zone.

Everything on this network is caged. Cameras can't talk to anything but their cloud. IoT lives in its own zone with no lateral reach. The default posture is DROP, and every flow has to be argued for. And then, for months, I ran a public-facing Next.js app on the exact same box that resolves DNS for every one of those segments. That's not zero trust. That's a contradiction with a nice dark theme.

The Contradiction#

The infrastructure Pi is the most-trusted machine I own. It's the DNS resolver for all VLANs, the NTP source, the monitoring hub. It is also — through a Cloudflare Tunnel — the only internet-facing application service on the network. I spent a year tightening every other corner, then stapled a public web stack to the kernel that holds the whole thing together.

Blast Radius Is the Whole Argument#

Forget the website for a second and ask one question: if the web stack gets popped, what does the attacker touch? Right now the answer is everything. A dependency CVE, a bad build, an nginx misconfig — any foothold on the application layer is a foothold on the resolver. The web stack is the softest, most-exposed, most-frequently-updated thing on the box, and it shares a process table with the hardest, most-load-bearing one. Splitting them apart is the single biggest structural fix available, and it has nothing to do with performance.

A Second Box Isn't the Point — Where You Put It Is#

The lazy version of this fix is "buy another Pi." That alone does nothing. If the second Pi sits in the management subnet next to the resolver, you've moved the web stack two inches and kept it inside the trust boundary. The fix that actually earns the hardware is the zone. The web host belongs in its own DMZ segment, in the Untrusted zone, with one outbound rule and no lateral access to management or users. DEFAULT DROP handles the rest. The separation is real only when the firewall enforces it.

The Egress Story Is Trivially Tight#

This is the part that makes a DMZ web host easy to reason about: a Cloudflare Tunnel needs no inbound rules at all. The tunnel daemon dials out; Cloudflare relays requests back down the established connection. So the entire allow list for the web Pi is outbound 443 to Cloudflare and nothing else. No port forwards, no inbound exceptions, no NAT hairpins. One rule. That's the kind of egress policy you can hold in your head.

The Cloudflare Pages Temptation#

There's an even safer option, and I want to name it because it's the honest comparison: host the site on Cloudflare Pages or Vercel and keep zero application attack surface on the network at all. No public service, no tunnel, nothing to pop. For most people that's the correct answer. The reason I'm not taking it is that the self-hosted Pi behind a tunnel is the lab showcase — it's the demonstration the site exists to make. Moving it to managed hosting would erase the thing it's proving. So the play is a dedicated web Pi in a DMZ: keep the demo, lose the blast radius.

Where This Leaves Me#

This one is decided, not yet built. The hardware is roughly a hundred and thirty to a hundred and fifty dollars all in, and the work is mostly the new VLAN and that single egress rule. Until it ships, I've at least made the current box leaner — stripping services it didn't need so the shared kernel carries less. But leaner isn't separated. The public app still rides the same kernel as the resolver until the split actually happens, and I'm not going to pretend otherwise on my own security blog.