GuidesSecurity

Tailscale and WireGuard on the same machine: why it breaks, fixes

A full-tunnel wg-quick (AllowedIPs 0.0.0.0/0) sends your 100.x tailnet traffic into WireGuard. How to see it with ip rule, and the fixes that work.

November 18, 2026The Everpod team
The short answer

Tailscale and a separate WireGuard tunnel run on one Linux machine without trouble as long as the WireGuard config routes only specific ranges. The clash comes from a full tunnel, AllowedIPs = 0.0.0.0/0: wg-quick then adds two policy-routing rules with no fixed number, and if Tailscale is already running they land, by a reading of the two programs’ source, just ahead of Tailscale’s own rules (5210 to 5270), so traffic for your 100.x tailnet addresses is sent into the WireGuard tunnel instead of tailscale0. Tailscale stays signed in, but connections to and from the tailnet fail. Check with ip rule and ip route get. The fixes: route only what the tunnel is for, put the tunnel’s routes in their own table with Table =, or bring WireGuard up before Tailscale so Tailscale’s rules come first. A tunnel numbered inside 100.64.0.0/10 is a separate conflict.

What it looks like

The case on Tailscale’s tracker is #6772, open since December 2022: on Ubuntu 22.04, running wg-quick up to send the machine’s traffic out through another WireGuard server made web services on its Tailscale address unreachable, while SSH to the same address kept working, and wg-quick down brought everything back. The reporter found the same in reverse, with the full tunnel on the client: it could no longer reach services on the rest of the tailnet. The thread does not establish why SSH survived. A Tailscale contributor’s first suspicion was the two fighting over /etc/resolv.conf; the reporter checked, and it was unchanged, so in that case it was routing, not DNS.

The same contributor’s general answer on the issue is that running several VPNs at once “rarely works well”, because they “fight over every resource: routing table, firewall rules, etc.” Tailscale’s page on running alongside other VPNs names the same two causes, plus one more: another network using Tailscale’s 100.64.0.0/10 addresses. WireGuard brought up by wg-quick can hit all three.

Why a full tunnel takes Tailscale’s traffic

Tailscale on Linux keeps its routes in table 52 and reaches it through four policy rules numbered 5210, 5230, 5250 and 5270 (the base, which the source calls “usually 5200”, and the offsets are in its Linux router source). The last of them sends everything that gets that far to table 52, which is how a packet for a 100.x address finds tailscale0.

wg-quick treats a route of exactly 0.0.0.0/0 (or ::/0) differently from every other route. By its source, it puts the default route in a table of its own, 51820 unless that is taken, marks the tunnel’s own packets with the same number, and adds two rules: send everything without that mark to table 51820, and before that, look in the main table but ignore its default route (suppress_prefixlength 0). It gives neither rule a number. The kernel then numbers a new rule one below the first rule after the built-in rule 0, and rules run lowest number first.

So the order the two programs start in decides the outcome, as a reading of the two sources together:

This is the workaround a user posted on #6772: stop tailscaled, bring the tunnel up with wg-quick, start tailscaled again, and “It works”. Restarting Tailscale later is harmless, since it puts its rules back at the same numbers; restarting the tunnel while Tailscale runs puts WireGuard’s rules back in front.

How to tell

List the rules in the order the kernel uses them:

ip rule
ip -6 rule
Copied

Tailscale’s are the ones numbered 5210 to 5270, ending in lookup 52. wg-quick’s are the pair with fwmark and lookup 51820, and suppress_prefixlength 0. If the pair’s numbers are lower than 5210, WireGuard wins. Then ask the kernel where a tailnet address actually goes, with the address of another device from tailscale status:

tailscale status
ip route get 100.101.102.103
ip route show table 52
Copied

ip route get prints the route “exactly as the kernel sees it”: healthy is dev tailscale0 from table 52, captured is dev wg0 from table 51820. Plain ip route shows only the main table, which is why Tailscale’s routes doc points at ip route show table 52, or ip route show table all for every table at once.

tailscale netcheck reports the public addresses Tailscale’s traffic leaves from. If it shows the WireGuard server’s address rather than the machine’s own, Tailscale’s traffic is going through the tunnel too, which is expected with a full tunnel and not a fault on its own. wg show wg0 fwmark prints the mark wg-quick set, which is how you know it took the full-tunnel path at all.

The fixes

Route only what the tunnel is for. If the tunnel exists to reach one private network or one host, list just those in AllowedIPs, for example 10.8.0.0/24. Any route that is not exactly a default route goes into the main table as an ordinary route, with no policy rules, and Tailscale’s rules run before the main table. Nothing clashes unless the range overlaps 100.64.0.0/10.

Give the tunnel its own table. The wg-quick man page documents Table: a number puts the tunnel’s routes, the default route included, in that table with no special handling, and off “disables the creation of routes altogether”. Nothing uses the table until a rule you write sends traffic there, so Tailscale is untouched. The man page’s own example sends only SSH through the tunnel:

[Interface]
Table = 1234
PostUp = ip rule add ipproto tcp dport 22 table 1234
PreDown = ip rule delete ipproto tcp dport 22 table 1234
Copied

The same ip rule selectors can pick one user’s traffic (uidrange 1001-1001), a destination (to) or a port. On a server whose tunnel serves one purpose, such as one program’s outbound traffic, this is the cleanest shape.

Keep the full tunnel, and start it first. Bring WireGuard up before Tailscale, as above. At boot the two units do not order themselves: wg-quick@.service waits for network-online.target and tailscaled.service only for network-pre.target and a few others, so nothing makes Tailscale wait for the tunnel. A systemd ordering drop-in makes Tailscale wait:

sudo systemctl edit tailscaled
# add:
[Unit]
After=wg-quick@wg0.service
Copied

It holds at boot only: a later wg-quick down and up while Tailscale runs puts WireGuard’s rules first again, and then restarting tailscaled does not help, because Tailscale puts its rules back at the same numbers, behind WireGuard’s. Stop it first, as in the #6772 workaround.

Why excluding 100.64.0.0/10 in AllowedIPs goes wrong

AllowedIPs has no exclusion syntax: it is a list of ranges, so “everything but the tailnet” has to be written as the many ranges that make up the rest. The user on #6772 who did that, leaving out both of Tailscale’s ranges, found it broke all connectivity. The source suggests why: once the list is no longer exactly 0.0.0.0/0, wg-quick skips its full-tunnel handling, including the mark that keeps the tunnel’s own packets out of the tunnel, and the ranges that cover the WireGuard server’s address now point into the tunnel. A list built this way also has to leave out the server’s own address. The Table approach does the same job with less to get wrong.

When the WireGuard tunnel uses 100.x addresses

A WireGuard network numbered inside 100.64.0.0/10 conflicts with Tailscale whatever the routes say. Besides the overlap, the Linux client installs a firewall rule that “drops any traffic in it that is not valid Tailscale traffic”: in its source it drops packets from that range arriving on any interface but tailscale0, which includes wg0. Renumbering the WireGuard network into a private range such as 10.0.0.0/8 removes both problems. Tailscale’s alternatives are the disable-linux-cgnat-drop-rule node attribute in the tailnet policy, which “removes a built-in protection against IP spoofing from local networks”, or disabling IPv4 in the tailnet, which cuts off IPv4-only resources. The firewall rule comes with --netfilter-mode=on, the default; in nodivert the rules are created but not activated, and off creates none, which also leaves out the rest of Tailscale’s firewall handling.

Reverse path filtering

With rp_filter set to 1 (strict), the kernel drops an incoming packet when the interface it arrived on is not the best route back to its source; with 2 (loose), only when the source is not reachable through any interface. While a full tunnel holds the route to 100.x addresses, a packet from a tailnet peer arriving on tailscale0 fails the strict check, so in strict mode even incoming connections never reach the program. Loose mode lets them in, but the replies still follow the captured route, so it is not a fix for the capture on its own. Check both settings, since the kernel uses the higher of the two:

sysctl net.ipv4.conf.all.rp_filter
sysctl net.ipv4.conf.tailscale0.rp_filter
Copied

Strict mode also broke Tailscale by itself, with no WireGuard involved: on #3310, using an exit node from Alpine Linux failed with strict filtering, and “A customer reported that setting rp_filter=2 (loose) fixed the problem.” Tailscale fixed that in 1.96.2 (March 2026): “Firewall rules created on Linux platforms correctly mark their traffic, avoiding reverse path filtering”. On an older client, loose mode is the workaround the issue records.

Tailscale is WireGuard too: what that changes

“Tailscale is built on top of WireGuard”, in its own words, but it runs its own userspace implementation behind its own interface, tailscale0, with its own keys and peers; a wg0 from wg-quick is a separate interface the two do not share. Their ports differ by default: Tailscale listens on UDP 41641, and a WireGuard interface uses its ListenPort, random if unset and 51820 in WireGuard’s examples. The conflict is never between the two WireGuards; it is over the machine’s routing rules and firewall.

Packet size is rarely the problem. Tailscale uses an MTU of 1280, and wg-quick, unless the config sets MTU, takes 80 off the underlying link’s, 1420 on an ordinary 1500 link. By arithmetic, Tailscale’s packets plus WireGuard’s 80 bytes of overhead come to 1360, which fits inside the tunnel. A DNS = line in the WireGuard config is worth a look, though: wg-quick hands it to resolvconf, and tailnet names depend on Tailscale’s own resolver.

On a server: a tunnel for one job, Tailscale for getting in

The common server shape is a VPS that uses WireGuard for one purpose, sending some traffic out through another location or reaching a private network, and Tailscale as the only way in, often to an agent running on it (Tailscale SSH for an agent server covers that side). Here the capture is a lockout, not an annoyance: the moment wg-quick up runs with a full tunnel and Tailscale already up, an SSH session over the tailnet can freeze. Prefer narrow AllowedIPs or Table with your own rules, keep a way in that does not depend on the tailnet (the provider’s web console, if it has one) while you change it, and enable the tunnel at boot only once the order is settled.

Two more things clash in the same way. The kill switch in the wg-quick man page rejects outgoing packets that do not leave through the tunnel, which, as written, covers everything sent out on tailscale0; it is the same firewall conflict NordVPN’s kill switch causes. And a Tailscale exit node and a full WireGuard tunnel both want the machine’s default route, so only one can carry its internet traffic; if you need the server’s traffic to leave from somewhere else, pick one of the two, and the exit node guide covers Tailscale’s way of doing it.

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.