ProjectsCase study 04

Cutting the public surface in half

Over a few years my lab had collected 31 public hostnames, including the consoles used to manage it. I reviewed every one, simplified how traffic reaches the services, and took the management consoles off the public internet.

Result
31 → 15
public hostnames
Admin interfaces
Private
management consoles and dashboards reachable only on the local network or over Tailscale
When
July 2026
Stack
Cloudflare Tunnel, Tailscale, Nginx Proxy Manager, Docker networks, single sign-on

The problem

Each new service had been given a public hostname when it was installed. Nobody decides to publish 31 hostnames. It happens one convenient shortcut at a time. Some of those hostnames led to management consoles, one led to a personal-finance app, and two led nowhere at all.

Every hostname also took the long way in: through the tunnel, then a reverse proxy, then the service. The proxy was a second place to configure, patch and get wrong.

Step 1: simplify the path

  1. BeforeVisitor
  2. EdgeCloudflare Tunnel
  3. Extra hopReverse proxyRouted every hostname
  4. TargetService
  1. AfterVisitor
  2. EdgeCloudflare TunnelRoutes straight to the container
  3. TargetServiceEnforces its own login

I moved 27 of the 31 hostnames to route from the tunnel directly to their containers. The reverse proxy's old entries were left in place, unused, so that any single hostname could be pointed back at the proxy if the direct route misbehaved. That gave every change its own rollback.

Step 2: decide what deserves to be public

With the path simplified, I went through the list and asked one question of each hostname: does someone outside my network need this?

GroupDecisionReached by
Management consoles and dashboardsRemovedLocal network or Tailscale
Personal-finance appRemovedLocal network or Tailscale
Back-end services used only through a phone appRemoved, after moving the phone app to TailscaleTailscale
Two hostnames that led nowhereDeletedNothing
Apps that have to be reachable from outsideKeptPublic, each behind its own login

The hypervisor and the NAS have no public address at all. The private AI assistant is reachable only over Tailscale.

The rules that came out of it

  • A new public hostname is a reviewed change, not a default.
  • Everything that stays public must enforce its own login.
  • A hostname isn't done until its login has been checked from outside the network.
  • Control-plane services stay private, with no exceptions for convenience.
A snag worth remembering

One app returned an error the moment it was switched to direct routing. Its container sat on a different Docker network from the tunnel, so the tunnel couldn't reach it. Checking network membership first is now part of the procedure.

What I would do next

  • Keep a current inventory of public hostnames in the documentation, so the next review starts from a list and not from the provider's dashboard.