Luoboyun1 GB of trial traffic for new accounts, valid 24 hours, for Clash / Mihomo clientsAlipay, WeChat or cryptoSign upAdAdLuoboyun, 1 GB to tryFor new accounts, 24 hours, Alipay / WeChat / cryptoSign up
dl-tailscale.is
English
简体中文繁體中文EnglishРусскийفارسی

Network Compiled

Always relayed, never direct

When status says relay instead of direct, speed drops. Read netcheck, then try UPnP, IPv6, a port and your own relay, in that order.

A letter that goes to the sorting boxes first takes the longer way
A letter that goes to the sorting boxes first takes the longer way W.carter, CC BY-SA 4.0

Both devices are online, yet copying runs at a few hundred KB a second: probably a relay. From mainland China the nearest official ones are in Hong Kong, Tokyo and Singapore, so data leaves the country and comes back.

First a comfort: relayed is connected and encrypted too, only slower. SSH and documents are fine. For large files, remote desktop and video it is worth getting direct.

Make sure

Look at the other device's line
tailscale status
tailscale ping other-name

direct means direct, relay means relayed. The status reader reads it for you.

Look at your network
tailscale netcheck
In netcheckGoodBad
UDPtruefalse, a firewall blocks UDP
IPv6yesno
MappingVariesByDestIPfalsetrue, so-called symmetric NAT
PortMappingUPnP or NAT-PMPempty

Four things, in order

  1. Turn on UPnP in the router. One side with a mapped port is usually enough.
  2. Turn on IPv6. With public IPv6 on both sides there is hardly a hole to punch. Mobile networks mostly have it.
  3. Open UDP 41641. Forward it to the device; company networks must allow outgoing UDP.
  4. Bridge the modem, so that the router dials in and one NAT disappears.
  1. Meet at a relayevery connection begins so
  2. Try directhole punching
  3. Try your own relayif you have one
  4. Official relayworks, slowly
How a connection forms

Still relayed: your own relay

From 1.86 any device in the network can relay; the feature is called Peer Relay. Take one that both sides reach directly, such as a cloud server with a public IP:

On that server
sudo tailscale set --relay-server-port=40000

Open UDP 40000 in the firewall and add a grant with tailscale.com/cap/relay to the access policy.

Reading netcheck

An example
* UDP: true
* IPv4: yes, 203.0.113.8:51234
* IPv6: no, but OS has support
* MappingVariesByDestIP: true
* PortMapping:
* Nearest DERP: Hong Kong

UDP passes, good; no IPv6; the port changes by destination, which is hard; no port mapping. So turn on IPv6 or UPnP, one of them, and look again.

Both sides together

Mine \ theirsPublic or mappedOrdinary NATHard NAT
Public or mappedDirectDirectDirect
Ordinary NATDirectMostlyLuck
Hard NATDirectLuckRelay

One side in the first column is enough, so work on home: phone, office and hotel all gain.

At home

  1. Bridge the modem, dial from the router.
  2. UPnP, or forward UDP 41641.
  3. No public IPv4: IPv6 and allow UDP 41641 to that machine.
  4. Its own firewall too.
  5. A proxy router: tailscaled direct, without fake-ip.

After each step ping home from a phone on mobile data and see whether it becomes direct.

Make it try

Until direct
tailscale ping --until-direct --c 30 name

From via DERP to via 1.2.3.4:41641 it is done. Without traffic it may fall back and rise again; that is normal.

Where to put your own relay

A peer relay must be directly reachable by both, best with a public address, near both. Its bandwidth is the limit.

Direct and still slow

Upload at home; a weak NAS processor; SMB over latency (try rsync or WebDAV); poor Wi-Fi.

Is a relay safe?

Yes. WireGuard encrypts end to end and the relay has no keys.

Direct yesterday, relayed today?

It depends on both networks at that moment. A new Wi-Fi or a different provider exit changes it, and Tailscale keeps trying.

Mobile always relays?

Most mobile networks are hard NAT. With public address or IPv6 at home it becomes direct.

From the office?

Depends on outgoing UDP. Otherwise only the relay over 443.

Is the relay limited?

It is shared and slowed; not for large traffic.

Read next

Neighbouring topics

Keywords on this page: Tailscale slow, Tailscale relay not direct, self-hosted DERP