ia

How I Fixed Tailscale Network Lock Breaking My Mullvad VPN Exit Nodes

The Problem

Tailscale's network lock (formerly "tailnet lock") is a security feature that requires every device on your tailnet to be cryptographically signed by a trusted node before it can communicate. It protects against account compromise — even if someone gets into your Tailscale account, they can't add a rogue device without physical access to a signing node.

The catch: when you enable it, your ~500 Mullvad VPN exit nodes stop working. They show up as “locked out” in tailscale lock status because they haven’t been signed. Tailscale doesn’t warn you about this upfront, and there’s no automatic exemption for Mullvad nodes. If you rely on Mullvad for privacy routing through Tailscale, enabling network lock silently breaks it.

Fig. 1 — One square per Mullvad exit node, locked out after tailscale lock init. Illustrative: ~493 squares, not a map of real nodes.

This bit me after I enabled network lock on my tailnet running Tailscale on macOS. Every Mullvad exit node disappeared from my available list, and connections fell back to DERP relays instead of going direct.

Diagnosing the Issue

Before tackling Mullvad, I hit a separate problem: Tailscale itself was misbehaving. Running tailscale status revealed a health warning:

“The MagicSock function ReceiveIPv4 is not running. You might experience connectivity issues.”

MagicSock is the component that handles direct peer-to-peer WireGuard connections between your devices. When it stalls, all traffic falls back to DERP relays — Tailscale’s fallback routing servers. The symptom: pinging my remote VM went through DERP(<region>) at ~140ms instead of connecting directly.

The root cause was the Tailscale network extension process, which had been running continuously since November 17 without a restart. The MagicSock goroutine had silently crashed inside it, but the rest of Tailscale kept running, masking the problem. A simple tailscale down / tailscale up cycle didn’t fix it because that only toggles the control plane state — the network extension process itself stayed alive with its broken goroutine.

Fix 1: Restarting Tailscale Properly

The fix for the MagicSock issue was quitting the Tailscale app entirely and relaunching it. On macOS, this restarts the network extension process that runs the actual WireGuard tunnel.

Steps:

  1. Quit Tailscale from the menu bar (right-click the icon → Quit Tailscale)
  2. Wait a few seconds for the network extension to terminate
  3. Relaunch Tailscale from Applications
  4. Verify with tailscale status — the MagicSock warning should be gone
  5. Ping a peer to confirm direct connections: tailscale ping <hostname> should show a direct path, not DERP

If the warning persists after a relaunch, hold Option and click the Tailscale menu-bar icon, then choose Debug → Reset to reinstall the VPN configuration, or restart the Mac. Killing just the app (pkill -x Tailscale) won’t help: the network extension keeps running.

After my restart, the health warning cleared and tailscale ping <vm-name> showed a direct connection at <vm-ip>:1024 instead of bouncing through a DERP relay.

before ~140ms
after direct · <vm-ip>:1024
The path to the remote VM before and after relaunching Tailscale, as reported by tailscale ping.

Fix 2: Bulk-Signing Mullvad Exit Nodes

With Tailscale healthy again, I enabled network lock with tailscale lock init. This generated a signing key on my Mac and locked out every unsigned node — including all ~493 Mullvad exit nodes.

The official Tailscale support team maintains a shell script specifically for this problem: tailscale-support/mullvad-script. It automates what would otherwise be an impossibly tedious process of signing hundreds of nodes one by one.

If you prefer to do it manually, the approach is:

  1. List all unsigned Mullvad nodes from tailscale lock status
  2. Extract their node keys (the nodekey: values)
  3. Sign each one with tailscale lock sign <nodekey>

Here’s a one-liner that does the same thing the script does:

tailscale lock status | grep 'nodekey:' | grep -i mullvad | awk '{print $1}' | while read key; do tailscale lock sign "$key"; done

Fig. 2 — The same field after the one-liner: 305 nodes signed in about two minutes, replayed here in a few seconds. The rest had rotated out or were duplicates in the status listing.

  • signed
  • locked out
  • rotated out / duplicate
305signed

This took about two minutes to sign 305 Mullvad exit nodes on my tailnet. The count was lower than the ~493 “locked out” number because some nodes had rotated out or were duplicates in the status listing.

One thing to note: Mullvad periodically rotates their exit nodes. When new nodes appear on your tailnet, they’ll be unsigned and locked out until you re-run the signing script. You may want to run it on a schedule or whenever you notice Mullvad exits are unavailable.

Verification

After signing, I confirmed everything was working:

  • tailscale lock status showed 0 Mullvad nodes locked out (down from ~493)
  • tailscale exit-node list showed 95 Mullvad locations available across all countries
  • All my personal devices remained signed and connected
  • Direct peer-to-peer connections were established (no more DERP fallback)

One last thing: when you run tailscale lock init, it outputs a disablement secret. Save it somewhere safe — it's the only way to disable network lock if you lose access to your signing key, and it won't be shown again.

Sources