You set up a Tailscale subnet router so you could reach your home network from anywhere, and from the road it works beautifully. Then you notice that at home, on the same Wi-Fi as everything else, reaching your own devices got slower and your router’s admin page stopped answering. The traffic is taking the long way around.
--accept-routes and is also physically on the LAN that a subnet router advertises, Tailscale’s route for that subnet can win over the plain local route. So a packet to a machine three feet away goes out through the tunnel to the subnet router and back, a “hairpin,” instead of straight across the switch. Don’t fix it by turning the subnet route off: that breaks the remote access you built it for. Fix it by making the direct local route win only when you are home, which, on a laptop whose one adapter serves both home Wi-Fi and a phone hotspot, has to be decided by the current IP address, because a static route can’t tell the two networks apart.A common home-server setup: an always-on box runs Tailscale as a subnet router, advertising your home range (say 192.168.1.0/24) to your tailnet. Now any of your devices, anywhere, can reach any machine on the home LAN by its normal 192.168.1.x address. To make that work on your laptop you enable --accept-routes, so it installs the routes the subnet router advertises. On the road, perfect: your laptop reaches the home NAS, the home server, even the router’s web page, all over an encrypted tunnel.
Then you carry the laptop home, join the same Wi-Fi your devices are on, and things get worse. A file copy to the NAS that should saturate gigabit crawls. http://192.168.1.1/ — your own router’s admin page, times out. A ping to a device on your own LAN comes back at 80 ms instead of the 1 ms you’d expect across a switch. Being on the same network as your devices has somehow made them harder to reach.
Table of Contents
Step 1: Confirm it’s local, and measure it
Before theorising, measure the thing that feels wrong, and measure it two ways. From the laptop, time a round-trip to a device on the LAN. Then do the same from a different machine on the LAN (one not running Tailscale, or not accepting routes) to the same target.
On the affected laptop you’ll see something like 80 ms and, often, packet loss or wild variance. From the plain LAN machine you’ll see well under a millisecond. The target is fine; the LAN is fine; the path from this laptop is not.
The target is fine and the LAN is fine. It’s the path from this one machine that’s wrong.
This is also the moment to notice a second, quieter symptom: any latency number you take from the affected laptop is now untrustworthy. A short ping sample from it can make the healthiest device on the network look like the worst, simply because its path is tunnelled. If you find yourself diagnosing a “slow device,” measure it from a machine whose path isn’t tunnelled before you blame the device.
Step 2: Two routes for the same LAN, and the tunnel wins
Print the routing table and look for your home subnet. You will find two entries for it:
192.168.1.0 255.255.255.0 100.100.100.100 100.x.x.x 5 <- via the Tailscale interface
192.168.1.0 255.255.255.0 On-link 192.168.1.x 306 <- direct, on the Wi-Fi interfaceCode language: CSS (css)
Both cover the same 192.168.1.0/24. The system picks the one with the lower metric, and the Tailscale route (metric 5) beats the direct one (metric 306). So every packet to a 192.168.1.x address (the NAS, the router, the machine next to you) is handed to Tailscale, which sends it to the subnet router and back. That round trip, often by way of a relay, is your 80 ms.
The router admin page is a sharper version of the same thing. A subnet router advertises the range so you can reach the LAN remotely; a well-run tailnet access policy then only permits the handful of services it should. The router’s own web UI is usually not on that permit list, and correctly so: a roaming device can’t reach it. But the hairpin applies that roaming policy while you are sitting on the LAN the policy is denying. Result: you can’t open your own router from your own couch.
Step 3: Confirm the tunnel is the path
If you need to be sure, open a connection from the laptop to a LAN device and look at the local address the connection uses. If it is the laptop’s Tailscale address (a 100.x address) rather than its LAN address, the traffic is leaving through the tunnel even though the destination is one switch hop away. That is the hairpin, confirmed.
Step 4: Why the obvious fixes are wrong
Three fixes suggest themselves. The first two are traps; the third is right but subtle.
“Turn off --accept-routes.” This does fix the hairpin at home: with the subnet route gone, the direct route is the only one left and local traffic goes straight across. But now the laptop has no route to the LAN when you’re away either, which is the entire reason you set the subnet router up. You’ve traded a slow home for no remote access. The obvious action isn’t doing what you think it does.
“Lower the Wi-Fi interface metric so the direct route wins.” Appealing, but it can’t work. The system builds an on-link route’s metric from the interface metric plus a fixed on-link offset (around 256). Even at interface metric 1, the direct route lands near 256, still far above the tunnel’s 5. You cannot get a /24 on-link route below the tunnel by tuning the metric.
“Add a more-specific route.” This is the right idea. Route selection prefers the longest prefix before it compares metrics, so a /25 route beats a /24 route no matter the metrics. Two /25 routes, 192.168.1.0/25 and 192.168.1.128/25, cover the whole /24 with a longer prefix, pinned to the direct Wi-Fi interface. At home they win, local traffic goes direct, and the tunnel’s /24 is left to handle nothing. Away from home, those routes are gone and the tunnel’s /24 takes over. Clean, if you can make the /25 routes exist at home and vanish when you roam.
And that last “if” is where a single Wi-Fi adapter bites you.
Step 5: The single-adapter trap, and the fix that survives it
Here is the detail that breaks the naive version of the fix: a laptop uses one Wi-Fi adapter for both your home network and your phone’s hotspot. The adapter doesn’t go down when you leave home; it just re-associates and gets a different IP (your home 192.168.1.x becomes a hotspot 10.x.x.x). So anything tied to “the Wi-Fi interface” follows you onto the hotspot.
Make those /25 routes persistent and you create a worse bug than the one you’re fixing. A persistent on-link route re-homes onto whatever IP the adapter currently has. On the hotspot, your “direct to 192.168.1.x” routes rebind to the hotspot interface and now claim that your home LAN is reachable over your phone’s connection, which it isn’t. The longer prefix wins, so traffic to the LAN (including, when you’re away, your remote access) is black-holed onto the hotspot. You’ve hijacked the exact path the subnet route was there to provide.
The only reliable signal for “am I home?” is therefore the current IP address, not the interface and not a static route. The fix is a tiny script that runs on every network change and decides:
# Pseudocode. Runs on each "network connected" event.
ip = current IPv4 of the Wi-Fi adapter
if ip == HOME_IP: # e.g. 192.168.1.x, your reserved home lease
ensure the two /25 direct routes exist # local traffic goes direct, fast
else:
ensure they do NOT exist # the tunnel's /24 handles the LAN
Code language: Bash (bash)
Trigger it on the OS event that fires whenever the machine joins any network (on Windows, a scheduled task bound to the “network connected” event; on Linux, a NetworkManager dispatcher script; on macOS, a launchd watch on the network configuration). Add the routes as non-persistent and let the script, not the OS, own their lifecycle. The result manages itself: at home the LAN is direct and fast, the router page answers, your diagnostics are honest again; on the hotspot the routes are gone and remote access runs over the tunnel exactly as designed.
A concrete, reusable version is below.
The short version
A Tailscale subnet router lets you reach your home LAN remotely. But a device that both accepts that route and sits on the LAN it describes will send local traffic out through the tunnel and back, a hairpin that shows up as ~80× latency, an unreachable router page, and misleading diagnostics. Turning off the subnet route breaks roaming; tuning the interface metric can’t beat the tunnel. The fix is two more-specific /25 routes that win by longest prefix at home only, and because one Wi-Fi adapter serves both home and a hotspot, “at home” has to be decided by the current IP on every network change, by a small event-triggered script, never by a static or persistent route.
The route manager (free, reusable)
Here is the Step 5 logic as a small, dependency-free script (the Windows form, since that’s where the /25-metric interaction is most fiddly; the same two ideas port to a NetworkManager dispatcher or a launchd watch). Set HOME_IP to your reserved home lease and IFACE to your Wi-Fi adapter’s name. It is MIT-licensed, so adapt it freely. Bind it to the OS’s “network connected” event, and it keeps a one-line log of each decision so you can see, after the fact, exactly when it added or removed the routes.
#!/usr/bin/env bash
# lan-route-on-home.sh - add direct /25 LAN routes only when on the home network,
# remove them otherwise, so a Tailscale subnet route never hairpins local traffic.
# MIT License. Set HOME_IP and IFACE. Run on every "network connected" event.
HOME_IP="192.168.1.x" # set this to your laptop's reserved address at home (e.g. 192.168.1.20)
IFACE="Wi-Fi" # the Wi-Fi adapter's name
LOG="$HOME/lan-route-on-home.log"
cur=$(netsh interface ipv4 show addresses "$IFACE" \
| sed -n 's/.*IP Address:[[:space:]]*\([0-9.]\{7,\}\).*/\1/p' | head -1)
have=$(route print -4 | grep -cE '192\.168\.1\.(0|128)[[:space:]]+255\.255\.255\.128')
if [ "$cur" = "$HOME_IP" ]; then
if [ "$have" -lt 2 ]; then
netsh interface ipv4 add route 192.168.1.0/25 "$IFACE" nexthop=0.0.0.0 metric=1 store=active
netsh interface ipv4 add route 192.168.1.128/25 "$IFACE" nexthop=0.0.0.0 metric=1 store=active
echo "$(date '+%F %T') HOME ($cur): direct routes ADDED" >> "$LOG"
fi
else
route delete 192.168.1.0 mask 255.255.255.128 >/dev/null 2>&1
route delete 192.168.1.128 mask 255.255.255.128 >/dev/null 2>&1
echo "$(date '+%F %T') AWAY ($cur): direct routes REMOVED" >> "$LOG"
fi
Code language: Bash (bash)
Two things make it safe to leave running: the routes are added store=active (never persistent), so the script, not the OS, owns their lifecycle; and if the IP can’t be read for any reason, it falls through to the remove branch, which is the safe default (worst case you lose the local-speed optimization, never your remote access).
Frequently Asked Questions
Does this happen with a Tailscale exit node too, or only subnet routers?
It’s specific to subnet routes. An exit node changes your default route (all internet traffic); a subnet router adds a route for a specific LAN range. The hairpin is about that LAN range’s route competing with your own on-link route for the same range, which only happens when you’re physically on that LAN. An exit node has its own separate caution (it sends all your traffic through one egress), but it is not this problem.
Why not just not accept routes on a device that lives at home?
If a device never leaves the LAN, it doesn’t need --accept-routes at all; it reaches everything directly, and you should leave accept-routes off. The hairpin only matters for a device that roams: it needs the subnet route when away and suffers from it when home. That dual life is the whole reason the fix has to be conditional rather than a one-time setting.
Is a Tailscale subnet router hairpin a bug?
No. Tailscale is advertising a route you asked it to, and your OS is choosing the lower-metric route as it’s designed to. Each piece is behaving correctly; the surprise is only at the seam, where a route meant for remote reach is also installed on a device that is, right now, local. Nothing is broken; the policy is just being applied in a context it wasn’t written for.
Will a DHCP reservation for the laptop help?
It’s a prerequisite, not a fix. The conditional script keys on a known home IP, so the laptop must reliably get the same address at home, and a DHCP reservation guarantees that. Without the reservation the “am I home?” test has no stable value to compare against. With it, the home case is unambiguous.