Prerequisites
- A Tailscale account
- An always-on Linux machine on the network to expose, with Tailscale installed
01The principle
A printer, a switch or a camera can’t run Tailscale. The subnet router does it for them: it advertises the local network to the rest of your tailnet and routes traffic to it.
By default it translates addresses (SNAT): local devices see the traffic arrive from the subnet router’s address, and so answer it naturally, with no route to add.
02Enable IP forwarding
Tailscale points it out: once forwarding is on, the machine’s firewall should deny forwarding by default, which ufw and firewalld do.
echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
sudo sysctl -p /etc/sysctl.d/99-tailscale.conf03Advertise the network
With firewalld, a known issue also requires allowing masquerading.
sudo tailscale set --advertise-routes=192.168.10.0/24
# Only if the machine uses firewalld
sudo firewall-cmd --permanent --add-masquerade04Approve the route
An advertised route isn’t active until it is approved: in the admin console, Machines page, pick the device, then Subnets › Edit, tick the route and save.
To avoid that click for every new machine, the access policy can declare autoApprovers: routes advertised by an authorised user or tag are approved automatically. The policy must also allow your devices to reach that network.
05Linux clients
Windows, macOS, iOS and Android use approved routes automatically. Linux clients only do so when asked:
sudo tailscale set --accept-routesKey takeaways
- A single Tailscale machine is enough for a whole network.
- IP forwarding on, route advertised, route approved (or autoApprovers).
- SNAT by default: local devices answer without an extra route.
- --accept-routes on Linux clients.
Example addresses.