beefcake: advertise 192.168.0.0/24 so tailnet clients can reach LAN-only services #542
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "beefcake-advertise-lan"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Phones on cellular using beefcake as exit node could reach lobste.rs and other internet hosts (after #540 landed the NAT fix), but silently failed to reach internal-only services that DNS resolves to LAN IPs — git.lyte.dev → 192.168.0.9, for example.
Root cause: Tailscale clients exclude RFC1918 destinations from exit-node routing unless the subnet is advertised as a route by some peer. So the phone resolves git.lyte.dev → 192.168.0.9, has no route for that IP, drops the packet. Works on wifi only because the phone is on the LAN directly.
Fix: advertise 192.168.0.0/24 from beefcake. Tailnet clients now have a route for the home subnet via beefcake → LAN-only services reachable from anywhere on the tailnet, exit-node or not.
Test plan
nixos-rebuild switch).sudo headscale nodes approve-routes -i 8 -r 0.0.0.0/0,::/0,192.168.0.0/24(the existing 0.0.0.0/0 + ::/0 routes must be re-listed because approve-routes is a SET operation, not an add).tailscale status --json | jq .Self.AllowedIPsshould include192.168.0.0/24.tailscale status --json | jq '.Peer | to_entries[] | select(.value.HostName=="beefcake") | .value.AllowedIPs'should include192.168.0.0/24.https://git.lyte.dev/— page loads.curl http://lobste.rs/from phone still works (didn't break general exit-node behavior).Security
No ACL change. Only
tag:admindevicehas the*:*rule that grants reachability to arbitrary destinations, sogroup:family/group:friendsstill can't reach LAN devices through this advertised route — they remain limited to the explicitbeefcake:80,443[,445]rules. Stacks on top of #540 cleanly (different lines of the same file).Pull request closed