Skip to content

Tailscale VPN

{
"tagOwners": {
"tag:relay": ["autogroup:admin"],
"tag:clients": ["autogroup:admin"]
},
"acls": [
{ "action": "accept", "src": ["*"], "dst": ["*:*"] }
],
"grants": [
{
"src": ["tag:clients"],
"dst": ["tag:relay"],
"app": { "tailscale.com/cap/relay": [] }
},
{
"src": ["tag:clients"],
"dst": ["tag:relay"],
"ip": ["*"]
}
]
}

The grants section must be set via the Tailscale API directly — the MCP ACL tool (manage_acl) silently drops it:

Terminal window
curl -X POST -H "Authorization: Bearer $TAILSCALE_API_KEY" \
-H "Content-Type: application/json" \
"https://api.tailscale.com/api/v2/tailnet/mordasiewicz.com/acl" \
-d '{ ... full ACL with grants ... }'

When direct connections fail (school NAT, mobile hotspot symmetric NAT), devices route through tsrelay instead of Tailscale’s DERP servers. No bandwidth throttling unlike DERP.

Devicetsrelay (Toronto, 100.95.40.19)
Relay port40000 (tailscale set --relay-server-port=40000)
Port forwardToronto UniFi: UDP 40000 -> tsrelay (192.168.177.228)
Systemd override/etc/systemd/system/tailscaled.service.d/relay.conf
Granttag:clients -> tag:relay (requires both app and ip grants)

Do not set --relay-server-static-endpoints — Bell PPPoE IP is dynamic. STUN + UPnP discovers the public IP automatically.

PriorityTypeLatency
1Direct (UDP hole-punch)Fastest
2Peer relay (tsrelay)~15ms Toronto-Kingston, no throttling
3DERP (Tailscale servers)~14ms, throttled
  • src = who can use the relay (tag:clients)
  • dst = the relay device (tag:relay)
  • Only the initiating device needs the tag, not both sides
  • Tags can’t be removed without tailscale up --force-reauth
  • To test without relay, remove grants from ACL instead of changing device tags

Mac LocationConnection TypeLatencyNotes
Toronto UniFiDirect~17msRequires UPnP enabled on UniFi
Toronto Bell Wi-FiDirect~15msWorks naturally (permissive NAT)
School (university)Peer relay~45msEDM NAT + no UPnP, direct fails, relay kicks in
Mobile hotspotPeer relay~50-120msCarrier CGNAT has symmetric NAT (EDM), no UPnP. Direct to tsrelay may work; workstation goes via peer relay
Anywhere (no relay)DERP Toronto~14msBandwidth throttled

PortProtocolPurpose
41641UDPDefault WireGuard (each device)
40000UDPPeer relay (tsrelay only)
3478UDPSTUN (NAT discovery)