brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: tailscale netcheck tells you why your connection is not direct

Network and access
~/tips/tip-tailscale-netcheck

tailscale netcheck

Reports your network's UDP, NAT and relay conditions to explain why Tailscale connections go through a relay.

Relayed connections usually trace back to the network you are on.

tailscale netcheck reports the physical network conditions around your machine. It does not need to reach another device, so it works for a quick check on hotel or office wifi too.

tailscale netcheck

The fields I look at first:

UDP says whether UDP gets out at all. If it is false, you are probably stuck on relays. MappingVariesByDestIP being true means a hard NAT that changes your public address per destination, which makes direct connections harder. PortMapping shows whether the router offers UPnP, NAT-PMP or PCP. At the bottom you get the nearest DERP relay and the latency to each region.

There are flags like --every to repeat the test and --format=json for scripts.

Caveat: a blank field means Tailscale could not measure that property, not that it is fine. And a poor result describes your current network. Run it again after you switch networks.

I would run it on the machine that has the problem, not on the one that is fine. The answer describes the network that machine sits on, and that is where a relayed path usually starts.

Further reading: Tailscale CLI reference, On this site: run tailscale ping to see if your connection is direct or relayed, On this site: tailscale dns status shows what MagicDNS is really doing

More Network and access tips scp -3 alice@server-a:/var/backups/db.sql.gz bob@server-b:/srv/restore/ tailscale exit-node suggest tailscale lock sign nodekey:1abddef1 tlpub:abcdef12 wg genpsk > peer1.psk Table = off All Network and access tips (163) All topics

Link