Built-in Tailscale can get permanently stuck on slow relays — firewall rewrites the router's own UDP source port (BE3600, firmware 4.9.0)

Hi

Thanks for the detailed investigation.

After reviewing the conntrack behavior more closely, we think the proposed masq_local=0 change is not a complete fix. If a LAN connection already owns the same translated UDP tuple, Netfilter must change the later router-local source port to keep the connections unique. Preventing that translation preserves the LAN connection, but the local Tailscale connection may fail instead. LAN traffic will not be delivered to tailscaled.

As an optional workaround, add a rule before the WAN masquerade rule:

mkdir -p /usr/share/nftables.d/chain-pre/srcnat_wan
cat > /usr/share/nftables.d/chain-pre/srcnat_wan/20-tailscale-local.nft <<'EOF'
meta nfproto ipv4 meta iif 0 udp sport 41641 return
EOF
/etc/init.d/firewall restart

An existing conntrack entry must also expire or be deleted once. This workaround still cannot resolve a real tuple collision.

The better solution is for Tailscale to select a new port when direct reconnection fails. Once Tailscale issue #18328 is implemented and released, the newer version could be installed using this unofficial community script.