A Subnet Router Gives Remote Access to a LAN Without Opening Inbound Ports
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.zaddresses) 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:
- Gateway: install the agent on one machine in the LAN.
- 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. - Tunnel: a laptop elsewhere sends traffic for
192.168.1.51through its encrypted tunnel to the gateway. - Forward: the gateway decrypts it and forwards it onto the LAN.
References
- Networking MOC - hub for networking notes.
- Overlay Networks Encapsulate Pod Traffic Inside Node-to-Node Packets - the same overlay/underlay split, here for devices.
- Tailscale documentation: Subnet routers - advertising and approving routes.
- WireGuard - the tunnel protocol underneath.
- NIST SP 800-207: Zero Trust Architecture - the principles behind per-device access.
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.