GuidesSecurity

Tailscale subnet router: setup, --accept-routes, ACLs and HA

Reach machines that can't run Tailscale: IP forwarding, --advertise-routes, approval or autoApprovers, --accept-routes on Linux, grants, HA and the fixes.

November 23, 2026The Everpod team
The short answer

A subnet router is a device on your tailnet that forwards traffic to a private network whose machines don’t run Tailscale: a home LAN, an office network, a cloud VPC. On Linux, turn on IP forwarding, run sudo tailscale set --advertise-routes=192.168.1.0/24, approve the route on the admin console’s Machines page (or let an autoApprovers rule approve it), and check that your tailnet policy allows traffic to that range. Windows, iOS, Android and the Mac App Store and standalone apps then use the route by themselves; a Linux device also needs sudo tailscale set --accept-routes. An exit node is the other routing feature: it carries all of a device’s internet traffic, while a subnet router carries only the ranges it advertises and leaves internet traffic alone.

Subnet router or exit node?

Both are a Tailscale device forwarding traffic for others, and one machine can be both. As of November 2026 (client 1.104.7), per Tailscale’s subnet router and exit node docs:

Subnet routerExit node
Carries
Traffic for the private ranges it advertises, such as 192.168.1.0/24All of a device’s internet traffic (0.0.0.0/0 and ::/0)
On the router
--advertise-routes=<CIDR>--advertise-exit-node
Who uses it
Every device that accepts routes, for those addresses onlyOnly devices that select it
Linux client
sudo tailscale set --accept-routessudo tailscale set --exit-node=<name>
Policy
A grant whose destination is the rangeA grant to autogroup:internet

If you want to reach a printer, a NAS or a database that cannot run Tailscale, you want a subnet router. If you want a device’s browsing to leave from another place, you want an exit node. Tailscale’s docs steer anyone tempted to advertise 0.0.0.0/0 as a subnet route to exit nodes instead, and a device using an exit node still sends subnet-routed addresses to their subnet router. Subnet routers are on every plan, and the devices behind one don’t count toward the plan’s device limit, though Tailscale still recommends installing the client on any device that can run it.

Set one up on Linux

The router is a machine inside the private network that stays on: a Raspberry Pi or small box on a home LAN, a VM in the cloud VPC. Linux running as root routes in the kernel, which Tailscale’s comparison of the two modes recommends for any heavily used router.

1. Turn on IP forwarding

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.conf
Copied

On a system without /etc/sysctl.d, the same two lines go in /etc/sysctl.conf. Tailscale advises keeping the firewall’s default of refusing forwarded traffic, which ufw and firewalld already have, so that forwarding being on doesn’t route traffic you never meant it to. On a machine running firewalld, a known issue can mean masquerading has to be allowed as well, as root: firewall-cmd --permanent --add-masquerade.

2. Advertise the routes

sudo tailscale set --advertise-routes=192.168.1.0/24
sudo tailscale set --advertise-routes=192.168.1.0/24,10.0.0.0/24   # two ranges
tailscale get advertise-routes                                     # what is advertised now
sudo tailscale set --advertise-routes=                             # stop advertising
Copied

With forwarding off, tailscale up prints Warning: IP forwarding is disabled, subnet routing/exit nodes will not work. and a link to the steps above. tailscale set prints nothing. Tailscale’s changelog adds the same check as a health check in client 1.98.1 (May 2026), a release whose Linux build was withdrawn, so a Linux router needs a later one. With forwarding off, it shows at the end of tailscale status:

# Health check:
#     - Subnet routing is enabled, but IP forwarding is disabled. Check that IP forwarding is enabled on your machine.
Copied

The check is skipped when tailscaled runs in userspace mode, which forwards without the kernel.

3. Approve them

Advertising is a request, and no device gets the route until an admin approves it. On the Machines page, the router carries a Subnets badge, and the property:subnet filter lists every device advertising routes. Open the device’s menu and its route settings, tick the ranges and save. Tailscale’s pages name that item differently: Edit route settings in its setup and site-to-site guides, Review subnet routes then Enable in its October 2026 high-availability guide, and a Subnets section on the device in its main subnet router page. While you are there, disable key expiry on the router; a device that joined with a tag has it off already. Routes can also be approved with no visit to the console, below.

4. Let the traffic through

Approving a route and permitting traffic are separate. In Tailscale’s route injection reference, the route puts packets into the tunnel and the policy decides whether they are delivered: “You can have a route without ACL access (packets enter the tunnel but are dropped by the filter), or ACL access without a route (packets never enter the tunnel).” On a tailnet still on the allow-all default nothing more is needed, because a * destination includes approved subnet routes. On a narrowed policy, add a grant that names the range:

{
  "src": ["autogroup:member"],
  "dst": ["192.168.1.0/24"],
  "ip": ["*"]
}
Copied

The reverse does not hold: a grant for 192.168.0.0/16 permits traffic to any address in it but creates no route, so only the ranges a router advertises and an admin approves are reachable.

On other platforms

Everywhere except Linux as root, Tailscale routes in userspace: it relays TCP and UDP, answers ping by pinging the target itself, and carries no other IP protocol. The same applies to a Linux router started with --tun=userspace-networking, which is what a container without /dev/net/tun ends up using (Tailscale in a container).

Approve routes automatically

An autoApprovers section in the policy file approves a route as soon as an allowed device advertises it, which is what you want for a router built by a script. Make the approver a tag rather than a person: Tailscale stops advertising a route if the person who advertised it is suspended or deleted, or if the device is re-authenticated by someone who cannot. Add these sections to your policy (they are not a whole file):

"tagOwners": {
  "tag:subnet-router": ["autogroup:admin"]
},
"autoApprovers": {
  "routes": {
    "192.168.0.0/16": ["tag:subnet-router"]
  }
}
Copied

A device the rule covers may advertise the range or any part of it, so this approves 192.168.1.0/24 too. On a new router, join with the tag and the routes in one command, signing in as an admin:

sudo tailscale up --advertise-tags=tag:subnet-router --advertise-routes=192.168.1.0/24
Copied

Order matters. Tailscale’s reference says auto-approver policies “only apply when Tailscale first receives a subnet route advertisement”, so a route advertised before the rule existed stays waiting. Clear it and advertise it again: sudo tailscale set --advertise-routes=, then the original line.

Using the routes from another device

Per the CLI reference, routes are accepted by default on Windows, iOS, Android and the Mac App Store and standalone apps, and the route injection reference adds Apple TV. Nothing else does, which includes Linux and the open source tailscaled on a Mac; in the words of Tailscale’s subnet router page, “Linux devices only discover Tailscale IP addresses” until you opt in:

sudo tailscale set --accept-routes
tailscale get accept-routes        # prints true once it is on
ip route show table 52             # Tailscale's routes on Linux; the range should be listed
ping 192.168.1.20                  # a device behind the router
Copied

Tailscale keeps its Linux routes in table 52, so ip route on its own and netstat don’t show them. To see which router a client is using for a range, look for the peer whose PrimaryRoutes contains it:

tailscale status --json | jq '.Peer[] | select(.PrimaryRoutes) | {HostName, PrimaryRoutes}'
Copied

Clients install an approved route without checking that the router is up, so the route can still be there while the router is offline and traffic through it fails. For names on the private network rather than addresses, add its DNS server as a split DNS nameserver on the admin console’s DNS page.

Who can reach what behind the router

The devices behind a router have no Tailscale identity, so the policy names them by address: a range, a single address such as 192.168.1.20, or a name you define in the policy’s hosts section for either. The ip field narrows a grant to ports, as tcp:445 for a file share. Since routes are not limited by the policy, keeping a range closed to someone means no grant may cover it, and the policy file reference suggests a tests entry that fails if one ever does.

By default the router rewrites the source address (SNAT, or masquerading), so a device on the subnet sees every connection coming from the router, and its logs and IP allowlists therefore cannot tell your laptop from anyone else on the tailnet; the grant is the place that tells them apart. On a Linux router you can turn this off with sudo tailscale set --snat-subnet-routes=false, after which the subnet’s devices see the real source but need a return route for 100.64.0.0/10 via the router’s LAN address, set on each device, in the VPC’s route table or through DHCP. Tailscale warns against turning SNAT off on a machine that is also an exit node. Connecting two LANs to each other (Tailscale’s site-to-site setup) needs exactly that: a Linux router on each side with SNAT off and --accept-routes on, grants in both directions, an MSS clamp, and routes on each LAN’s devices pointing at their router unless it is already their gateway.

Grants can also say which routers may carry a source’s traffic, with a via field that takes tags only. That is how you send one group through one office’s router.

A subnet router for an AI agent’s server

An agent on a cloud server is on your tailnet but not on your home or office network, and a subnet router is how it reaches one, or how you reach what sits beside it.

The agent needs something on a private network: a database in a VPC, a NAS at home, a service that only listens on an office LAN. Put the router inside that network, then on the agent’s server, which is Linux, run sudo tailscale set --accept-routes. What the agent can then reach is up to your policy. On the allow-all default it is every approved route in the tailnet: the whole home LAN, its router’s admin page and the printers included, for any command the agent runs. With the server tagged and locked down so it starts no connections, it reaches nothing until a grant names it, so name only what it needs:

{
  "src": ["tag:agent-server"],
  "dst": ["10.0.0.5"],
  "ip": ["tcp:5432"]
}
Copied

With SNAT on, the database sees the router, not the agent, so a rule on the database cannot single the agent out; this grant can. And if the advertised range overlaps a network the server itself is on, such as a provider’s private network that also uses 10.0.0.0/16, accepting routes can send that local traffic into the tunnel, because on Linux Tailscale’s routing rules come ahead of the server’s own routes (the last overlap case below).

You want to reach what sits beside the agent: a managed database or other VMs on the provider’s private network, with no public address. Make a Linux machine on that private network the router, the agent’s server or a separate small VM, and advertise the private range. Tailscale’s VPC guide is this setup step by step, and its docs list cloud-managed databases such as Amazon RDS and Google Cloud SQL among the uses. In AWS, Azure and Google Cloud, the problem Tailscale says it sees most is a security group blocking the router’s traffic to the subnet. On AWS, advertise 172.16.0.0/12 rather than 172.0.0.0/8: only part of the larger range is private, and Google has addresses in the rest.

Services on the agent’s own server need none of this. The server already has a tailnet address, and Tailscale Serve puts a local port on an HTTPS name your devices can open.

Overlapping ranges

Different prefix lengths

If router A advertises 10.0.0.0/16 and router B 10.0.0.0/24, the most specific route wins: 10.0.0.1 goes through B, 10.0.1.1 through A. If B goes offline, Tailscale does not fall back to A’s wider route; it drops traffic to the /24, because “an offline router cannot withdraw its route advertisement.” Tailscale does this on purpose: falling back could send traffic to an unintended or unauthorized destination. The fix is to have A advertise both 10.0.0.0/16 and 10.0.0.0/24, so the /24 has two routers to fail over between.

The same range in two places

Two VPCs or two homes that both use 192.168.1.0/24 cannot be told apart by address. Tailscale treats two routers advertising the same range as a high-availability pair and sends traffic to whichever one it selects. The answer is 4via6, which gives each site’s range a unique IPv6 prefix. Pick a site ID per network (0 to 65535), generate the prefix, and advertise that instead:

tailscale debug via 7 10.1.1.0/24
# fd7a:115c:a1e0:b1a:0:7:a01:100/120
sudo tailscale set --advertise-routes=fd7a:115c:a1e0:b1a:0:7:a01:100/120
Copied

With MagicDNS on, 10.1.1.16 at site 7 is reachable as 10-1-1-16-via-7; older name formats stopped working in client 1.102.1. Write grants for the IPv6 prefix, not the IPv4 range. A 4via6 router needs client 1.24 or later, and Tailscale asks for 1.102.3 or later for security (bulletin TS-2026-011).

A route that covers the LAN you are on

A device sitting on the very network a router advertises, such as a desktop at home or a second machine in the same VPC, can end up sending local traffic through Tailscale. Tailscale’s fix depends on the system. Windows and macOS prefer the most specific route, so advertising 192.168.2.0/23 for a 192.168.2.0/24 LAN lets the LAN’s own route win. On Linux, Tailscale’s routing rules (priorities 5210 to 5270) come ahead of the main table, so an accepted route that covers the LAN takes its traffic; a rule at a higher priority sends the LAN back to the main table:

sudo ip rule add to 192.168.2.0/24 priority 2500 lookup main
Copied

It does not survive a reboot, so make it part of the network configuration or a oneshot service, or leave --accept-routes off on machines that are already on the network. Tailscale advises both workarounds only where the network is fixed and known: on a laptop’s Wi-Fi, another network using the same range would get traffic meant for the tailnet.

High availability

Run two or more routers that advertise exactly the same prefixes and approve the routes on each; only exact matches are failover candidates, so a /24 and a /16 are not. Which one clients use is the tailnet’s route selection setting, on the admin console’s General page since October 2026:

You cannot mark a router as preferred. A via grant limits which routers are eligible, and a router it excludes is no fallback. Leave --accept-routes off on the routers themselves: with it on, a standby accepts its own routes from the primary and sends traffic for its directly attached network through it. And a router only counts while its key is valid, so an expired key takes it out of the pool.

When it doesn’t work

What you seeWhyWhat to do
A Linux device can’t reach the subnet; a phone or laptop can
Linux doesn’t accept routes by defaultsudo tailscale set --accept-routes; tailscale get accept-routes shows the setting
No device reaches the subnet, and a Linux client that accepts routes has no route for it
The routes are advertised but not approvedApprove them in the router’s route settings, or use auto approvers
The route is in table 52 but connections time out
No grant permits it, forwarding is off, or a firewall in between blocks itCheck the grant, then tailscale status on the router for the forwarding health line, then whether the router itself can reach the destination and what its security group allows
Auto approvers added, routes still waiting
The rule only applies to new advertisementssudo tailscale set --advertise-routes=, then advertise again
Routes stopped after someone left the tailnet
They were approved for the person who advertised themTag the router and make the tag the approver
A Linux machine on the LAN loses its own LAN after --accept-routes
Tailscale’s routing rules outrank the main tableThe ip rule … lookup main line above, or don’t accept routes there
Failover doesn’t happen
The routers’ prefixes differ, or the more specific router is the one that went downAdvertise identical prefixes on every router
A 100.64.0.0/10 service behind the router is unreachable from Linux
Tailscale’s Linux drop rule for its own address rangeThe disable-linux-cgnat-drop-rule node attribute, with reverse path filtering on (CGNAT interoperability)
Docker containers on the router lose DNS
Stateful filtering is on (it has been off by default since 1.66.4)sudo tailscale set --stateful-filtering=false; see containers losing DNS with Tailscale
Everything behind the router stopped on one day
The router’s key expiredExtend the key in the console, then disable expiry

To see what the policy actually lets a device accept, tailscale debug netmap prints its packet filter, and tailscale debug prefs shows RouteAll, the setting --accept-routes controls.

Run Claude Code, Codex, OpenCode, Pi, Hermes or OpenClaw on an always-on developer pod.

A developer pod is a permanent cloud computer (VPS), set up and secured for you, with your pick of Claude Code, Codex, OpenCode, Pi, Hermes and OpenClaw installed. Run more agents at once than your laptop can hold, and keep them working when it’s closed. From $24 a month, built in about ten minutes.