Tailscale Exit Node and Subnet Router: Home Setup Guide

16 min read

,
Tailscale at Home graphic showing a phone and laptop linked through a home mini PC to a house network and the internet, with the text Exit Node + Subnet Router

A Tailscale exit node routes your device’s internet traffic through your home connection. A subnet router lets it reach home devices that cannot run Tailscale, such as a printer, NAS or router. One always-on Linux machine can do both, giving you remote access without forwarding ports on your router.

Exit nodes and subnet routers are available on Tailscale’s free Personal plan. You still need an always-on device at home and enough upload speed for the traffic you plan to route through it. If you already use Tailscale to reach a home server behind CGNAT, the same machine can often take on these roles.

Exit node vs subnet router: what each one does

By default Tailscale is an overlay network. It connects your devices to each other and leaves normal browsing alone, so YouTube or your bank still goes out through whatever Wi-Fi you are on. The two features change that in different ways.

An exit node carries the default routes, 0.0.0.0/0 and ::/0, which is how a traditional VPN works. Websites see your home public IP address. Every device has to opt in separately, the exit node has to advertise itself, and a tailnet admin has to approve it, so nothing starts routing all your traffic by accident.

A subnet router advertises only the ranges you name, such as 192.168.1.0/24. Traffic to those addresses goes home through the tunnel and everything else stays local. Tailscale’s own advice is to install the client directly on devices where you can, for the best security and performance, and to use a subnet router for the rest. A side benefit: devices behind a subnet router do not count toward a plan’s device limit.

Diagram comparing a Tailscale exit node, which sends all internet traffic from a phone on cafe Wi-Fi out through a home Linux box, with a subnet router, which only routes 192.168.1.0/24 traffic to a printer, NAS and router page
Exit nodes route internet traffic; subnet routers provide access to selected home-network ranges. Image: Techzei
QuestionExit nodeSubnet router
What it carriesAll internet traffic (default routes)Only the LAN ranges you advertise
Advertise with--advertise-exit-node--advertise-routes=
Admin approvalUse as exit nodeTick each advertised route
What each client doesPicks the exit node by handNothing on most OSes; Linux needs --accept-routes
Typical home usePublic Wi-Fi, Access through your home IP while travellingPrinter, NAS, cameras, router admin page
Effect on browsing speedLimited by your home upload speedNone for normal browsing

One machine can act as both an exit node and a subnet router.

What you need before you start

  • An always-on device at home. Linux is the best choice: a Raspberry Pi, a mini PC, a NAS that runs Linux, or a small home server. Tailscale also runs exit nodes on macOS, Windows, Android, iOS and Apple TV, but on macOS, Windows and Android the exit node runs in userspace, which Tailscale says is less mature and less optimised than the Linux kernel path. Macs and Windows PCs also must not sleep, and Tailscale describes Android exit nodes as possibly too slow for most uses.
  • Tailscale v1.20 or later on the exit node and on every device that uses it. Anything installed in the last few years clears this easily.
  • Owner, Admin or Network admin rights on the tailnet, because someone has to approve the routes. On a personal tailnet that is you.
  • Your home LAN range in CIDR form, for example 192.168.1.0/24. Step 3 shows how to find it.
  • No port forwarding. Tailscale makes outbound connections, so this works behind CGNAT and on most home routers without changing their settings.

Step 1: Install Tailscale on the home box and log in

On a Debian, Ubuntu, Raspberry Pi OS or Fedora machine, the official install script adds Tailscale’s package repository and installs the client. If you prefer not to pipe a script into a shell, Tailscale’s stable package page has manual steps for each distribution.

curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up

tailscale up prints a login link. Open it on any device, sign in with the account you use for your tailnet, and the machine appears on the Machines page of the admin console. Then note its Tailscale address, which you will need later for Linux clients and DNS:

tailscale ip -4

It returns an address in the 100.x.y.z range. Give the machine a clear name in the admin console, such as home-gateway, so it is easy to pick from a phone menu.

Step 2: Turn on IP forwarding

A Linux machine will not pass packets between its network interfaces until you allow it. Both an exit node and a subnet router need this. Tailscale’s documented commands write a small sysctl file and load it immediately:

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

If your system has no /etc/sysctl.d directory, append the same two lines to /etc/sysctl.conf and run sudo sysctl -p /etc/sysctl.conf instead.

Two firewall notes from Tailscale’s documentation are worth following. First, your firewall should deny forwarding by default, which is already how ufw and firewalld ship, so turning on forwarding does not route traffic you did not intend. Second, machines that use firewalld, common on Fedora and RHEL-style systems, may need masquerading enabled because of a known issue:

sudo firewall-cmd --permanent --add-masquerade
sudo firewall-cmd --reload

On macOS you can skip this step, because macOS turns on forwarding by itself when you advertise routes. Windows needs IP forwarding switched on before it can act as a subnet router.

Step 3: Find your LAN range and advertise both roles

Your home network range is the part you share with the subnet router. On the home box, list its IPv4 routes:

ip -4 route

Look for a line such as 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.50. The first part, 192.168.1.0/24, is your LAN range. You can also find it in your router’s LAN or DHCP settings. Advertise only what you need: the whole /24 is normal for a home, but a single device can be shared as a /32, such as 192.168.1.20/32 for just the NAS. Never advertise 0.0.0.0/0 as a subnet route; Tailscale’s docs say to use an exit node for that.

Now advertise both roles. tailscale set changes only the settings you pass, so you can add them together or one at a time:

sudo tailscale set --advertise-exit-node --advertise-routes=192.168.1.0/24

Replace the range with your own. Separate several ranges with commas, for example --advertise-routes=192.168.1.0/24,192.168.20.0/24 if your cameras live on a separate VLAN. At this point the routes are only offered. Nothing uses them until you approve them.

On the GUI apps the same switches are in the menus. On Windows choose Exit node then Run exit node, on macOS Exit Node then Run Exit Node, on Android open Exit Node and select Run as exit node, and on an iPhone open Exit Node and select Run Exit Node. Android adds subnet routes under the avatar menu, Settings, Subnet routing, Add route.

Step 4: Approve the routes and stop the key from expiring

Open the Machines page of the Tailscale admin console. Your box now shows an Exit Node badge and a Subnets badge. On a crowded tailnet, type property:exit-node or property:subnet into the filter to find it.

  1. Select the … menu at the end of the machine’s row and choose Edit route settings.
  2. Tick the subnet range or ranges you advertised.
  3. Tick Use as exit node.
  4. Select Save.

For an unattended home router, consider Disable key expiry in the machine menu so it does not become unreachable while you are away. This removes periodic reauthentication for that machine, so keep it updated and remove it from the tailnet promptly if it is lost or compromised. Tagged devices have key expiry disabled by default.

Tailscale admin console Machines list with a device menu open showing Share this machine, Enable Subnet Routes, a red-outlined Disable Key Expiry option and Remove
Key-expiry controls are in the device menu; this official screenshot uses older menu labels. Image: Tailscale

Tailscale’s documentation still uses this older screenshot, where the route option reads Enable Subnet Routes; in the current console that entry is Edit route settings, and Disable key expiry sits in the same menu. If a key has already expired and you cannot get to the machine, the same menu offers Temporarily extend key, which gives you 30 minutes to log in again or disable expiry.

Step 5: Use the exit node from your phone and laptop

Each device turns the exit node on for itself. The menus are short:

  • Android: open the Tailscale app, go to Exit Node and select your home box. The section turns blue when it is active. Choose None to stop.
  • iPhone and iPad: choose the exit node from the top of the app’s main screen. Select None or turn it off to stop.
  • Windows: select the Tailscale icon in the system tray, then Use exit node, then your home box. The option only appears once an approved exit node exists.
  • macOS: open the Tailscale menu bar item, then Exit Nodes, then the machine name. Versions before v1.60.0 call this Use exit node.
  • Linux: use the command line, shown below.
# Route all internet traffic through the home box
sudo tailscale set --exit-node=100.x.y.z

# Same, but keep access to the local network you are on
sudo tailscale set --exit-node=100.x.y.z --exit-node-allow-lan-access=true

# Stop using the exit node
sudo tailscale set --exit-node=

Swap 100.x.y.z for your home box’s Tailscale address from tailscale status or the admin console. To confirm it works, check your public IP address in a browser before and after. With the exit node on, it should match your home connection.

Tailscale diagram of an overlay network with a NAS, laptop, phone and desktop, where the desktop is highlighted as an exit node and the laptop reaches google.com through it
The selected exit node sends internet traffic out through its own connection. Image: Tailscale

Local network access deserves a moment. With an exit node on, your device cannot reach other devices on the network it is physically connected to, such as the hotel printer or a Chromecast in an Airbnb. The Allow local network access setting, called Allow LAN access on Android, creates an exception for that local network while everything else still goes home. Tailscale warns that it also exposes you to other devices on that network, so switch it on only when you trust the network, and only for as long as you need it.

Step 6: Reach your home LAN devices through the subnet router

Android, iOS, macOS, Windows and Apple TV pick up approved subnet routes automatically, so from mobile data you can type 192.168.1.1 into a browser and reach your router’s page, or open the NAS at its usual LAN address. Linux is the exception: it only learns Tailscale addresses until you opt in.

sudo tailscale set --accept-routes

Test in two stages. First ping the subnet router’s own Tailscale address from the remote device. If that works, try a LAN address behind it. If the first test passes and the second fails, the problem is on the home box (forwarding or firewall) or the route was not approved; if neither works, the device is not connected to the tailnet.

One trap catches a lot of people. Many home routers use the same few ranges, such as 192.168.0.0/24 and 192.168.1.0/24, and so do many hotels and offices. If the network you are visiting uses the same range as your home, addresses become ambiguous. The simplest fix for a home user is to move the home LAN to a less common range in your router’s DHCP settings. Tailscale also offers 4via6 subnet routers for overlapping ranges, which are mostly useful when you cannot renumber.

Do not run --accept-routes on the subnet router itself unless you have a reason. Tailscale warns that when two routers advertise the same range for high availability, accepting routes can make the standby send its own LAN traffic through the primary.

Step 7 (optional): Use your home DNS and Pi-hole everywhere

A subnet router pairs well with home DNS. If you run Pi-hole with Unbound, you can make every device on your tailnet use it, wherever it is. On the DNS page of the admin console, under Nameservers, choose Add nameserver, then Custom, and enter the Pi-hole’s address. Then turn on Override DNS servers, which makes tailnet devices ignore their local DNS and use yours.

Tailscale admin console DNS page with an Enable MagicDNS button and a Nameservers section showing Global nameservers, the Override local DNS toggle and an Add nameserver menu
Configure a nameserver only after checking that clients can reach it. Image: Tailscale

There are two details to get right. If Tailscale runs on the Pi-hole machine itself, use its 100.x.y.z address, and in Pi-hole go to Settings, DNS, switch to Expert and use the documented interface setting so it answers queries arriving through Tailscale. If you select Permit all origins, restrict DNS access with host and tailnet rules; never expose port 53 to the public internet. Tailscale’s own Pi-hole guide pairs this with a strong admin password. If the Pi-hole is a separate box, you can use its LAN address instead, since the subnet route makes it reachable. And make sure every device can actually reach the nameserver before you enable the override; Tailscale notes that a device blocked from the nameserver by access rules cannot resolve anything.

Exit nodes change DNS too. By default, a device using an exit node sends all its DNS lookups to the exit node, whatever nameservers you set. If you want a particular nameserver used even while on the exit node, open it on the DNS page and enable Use with exit node.

Access rules: only if you changed the default policy

A new tailnet allows every user to use an approved exit node and reach approved subnets, so most home users can skip this section. It matters once you replace the default policy with tighter rules. Exit node use is controlled by the special destination autogroup:internet, not by the exit node machine. Tailscale points out that granting access to the exit node device only permits things like SSH to it, not internet routing through it.

A minimal policy for a family tailnet that allows internet routing through any exit node plus access to the home LAN looks like this. Adjust the group members and the range, and add it alongside your existing rules:

{
  "groups": {
    "group:family": ["you@example.com", "partner@example.com"]
  },
  "grants": [
    {
      "src": ["group:family"],
      "dst": ["autogroup:internet"],
      "ip": ["*"]
    },
    {
      "src": ["group:family"],
      "dst": ["192.168.1.0/24"],
      "ip": ["*"]
    }
  ]
}

Route approval and access rules are separate. Approval decides which routes reach client routing tables; the policy decides which traffic is allowed. A route can be approved and still blocked, which is a common reason for “it shows up but nothing loads”.

Make it faster on Linux

Speed through an exit node is capped by your home internet’s upload, because everything you download while away first arrives at home and is then sent back out to you. A fibre plan with a weak upload will feel slow as an exit node however good the hardware is.

On the box itself, Tailscale recommends a Linux 6.2 or newer kernel with Tailscale 1.54 or later, which enables UDP throughput improvements through transport layer offloads. For exit nodes and subnet routers it also suggests turning on UDP GRO forwarding for the network interface that faces the internet:

NETDEVS=$(
  (ip -4 -o route get 8.8.8.8; ip -6 -o route get 2001:4860:4860::8888) 2>/dev/null |
    awk '{for (i = 1; i < NF; i++) if ($i == "dev") print $(i + 1)}' |
    sort -u
)
for NETDEV in $NETDEVS; do
  sudo ethtool -K "$NETDEV" rx-udp-gro-forwarding on rx-gro-list off
done

This does not survive a reboot on its own. Raspberry Pi OS Bookworm and later, Fedora and RHEL use NetworkManager, where the setting can be saved into the connection profile with nmcli connection modify and the ethtool.feature-rx-udp-gro-forwarding on option. Systems with networkd-dispatcher can use a small script in /etc/networkd-dispatcher/routable.d/. Tailscale’s performance page has both versions. On a mini PC, a faster CPU clock helps more than extra cores, according to the same page.

Direct connections generally perform better than relayed ones. Run tailscale status on the remote device; a relayed connection sends traffic through a DERP server. Check the connection type before assuming the home server needs faster hardware.

Running Tailscale in Docker instead

If everything on your server lives in containers, the official tailscale/tailscale image can do the same jobs. TS_ROUTES=192.168.1.0/24 advertises subnet routes, and TS_EXTRA_ARGS=--advertise-exit-node passes the exit node flag. Set TS_STATE_DIR to a mounted volume or the container appears as a brand-new machine after every restart. The image uses userspace networking by default, which works everywhere but is slower; TS_USERSPACE=false switches to kernel networking, which needs /dev/net/tun and the net_admin and net_raw capabilities. For a box whose main job is routing, installing Tailscale directly on the host is simpler to debug.

Quick command reference

Every command in this setup fits on one card. Keep it handy for the day you rebuild the box or add a second home.

Cheat sheet of Tailscale Linux commands: sudo tailscale up, set --advertise-exit-node, set --advertise-routes=192.168.1.0/24, set --exit-node, --exit-node-allow-lan-access=true, set --accept-routes and tailscale ip -4
A command reference for the Linux routing setup. Image: Techzei

Troubleshooting common problems

SymptomLikely causeFix
Exit node missing from the phone or laptop menuNot approved, or your policy has no autogroup:internet grantTick Use as exit node in Edit route settings; add the grant if you use a custom policy
Tailscale IP of the router pings, LAN addresses do notIP forwarding off, firewall blocking, or route not approvedRe-run the Step 2 commands, check firewalld masquerade, approve the subnet
Linux laptop cannot reach any LAN addressLinux ignores subnet routes by defaultsudo tailscale set --accept-routes
Everything stopped after about six monthsDevice key expired (180 days by default)Disable key expiry on the home box, then reauthenticate it
Cannot reach the hotel printer or TV while on the exit nodeLocal network access is offTurn on Allow local network access while you need it
Exit node on a Mac or Windows PC keeps disappearingThe computer went to sleepPrevent sleep; on Windows also enable Run Unattended
Exit node is slowRelayed connection or a low home upload speedCheck tailscale status, apply the Linux tuning, consider a faster upload plan

Frequently asked questions

Is a Tailscale exit node free?

Yes. Exit nodes and subnet routers are available on all plans, including the free Personal plan. You supply the hardware and the internet connection.

Is an exit node the same as a commercial VPN?

It does the same basic thing, sending all traffic through an encrypted tunnel, but the traffic leaves from your own home connection, so websites see your home IP. That helps on public Wi-Fi and with services that expect you at home. It does not hide your activity from your home ISP, and it cannot give you an IP address in another country unless you run an exit node there.

Can one machine be both an exit node and a subnet router?

Yes, and that is the usual home setup. The one documented exception: if you disable source NAT on a node that is both a subnet router and an exit node, Tailscale says upstream traffic can be dropped, and it recommends splitting the roles across two machines.

Do devices behind the subnet router count toward my device limit?

No. Tailscale says devices reached through a subnet router do not count toward a plan’s device limit. Installing Tailscale directly on a device is still preferred where possible.

Can an iPhone or Apple TV be an exit node?

Yes. iOS devices can act as exit nodes from Tailscale v1.98.1, and Apple TV is supported too. For an Apple TV, Tailscale says the most common reason it becomes unreachable when asleep is that it is not set up as a home hub.

Does Tailscale log the sites I visit through the exit node?

Destination logging for exit node traffic is off by default for privacy, abuse and security reasons. It is only available on Premium and Enterprise plans, needs a sales contract, and has to be switched on by an admin.

About the author