A Subnet Router Gives Remote Access to a LAN Without Opening Inbound Ports

In progress Networking

Reaching a homelab from outside used to mean forwarding a router port to an SSH bastion or a VPN server, a door every botnet scanner finds. A mesh VPN such as Tailscale (built on WireGuard) only makes outbound connections, and a single subnet router inside the LAN can then give remote devices access to the whole physical network, with no inbound port open.

From Perimeter to Mesh

  • Port forwarding: an exposed service, one vulnerability away from a compromise.
  • Mesh VPN: each device runs an agent that connects outward and builds encrypted peer-to-peer tunnels. Devices share an overlay network (Tailscale uses 100.x.y.z addresses) wherever they are. Access rules apply per device and per user rather than "inside the network = trusted".

The Subnet Router Pattern

Installing an agent on every node or pod is heavy. Instead:

  1. Gateway: install the agent on one machine in the LAN.
  2. Advertise: it announces the physical subnet to the mesh: tailscale up --advertise-routes=192.168.1.0/24 (with IP forwarding enabled), and an admin approves the route.
  3. Tunnel: a laptop elsewhere sends traffic for 192.168.1.51 through its encrypted tunnel to the gateway.
  4. Forward: the gateway decrypts it and forwards it onto the LAN.

References

Review cards

Flashcard Why is forwarding a router port to an SSH bastion or VPN server risky?

It exposes a service to the whole internet: every botnet scanner finds the door, and one vulnerability in that service is a compromise.

Flashcard How does a Tailscale subnet router give access to the LAN without an inbound port?

The agent on one LAN machine only connects outward to the mesh and advertises the subnet (--advertise-routes=192.168.1.0/24). Remote devices send LAN traffic through their tunnel to it, and it forwards it onto the LAN.