Files
tailscale/wgengine
NazarkinRomanandRoman Nazarkin f8accbe3c4 wgengine/router: accept loopback traffic from Service VIPs (#22702)
In TUN mode the VIPs of a Tailscale Service have to be on a local
interface, so a connection from the node to its own Service runs over
lo with a VIP as both source and destination. ts-input accepts loopback
traffic only from the node's own addresses, so over IPv4 these packets
hit the CGNAT anti-spoofing DROP, and the node cannot reach its own
Service. IPv6 has no such drop and works.

Have the Linux router keep an "-i lo -s <vip> -j ACCEPT" rule for each
address in router.Config.ServiceAddrs, like it does for LocalAddrs,
re-adding them when the netfilter mode changes. The rule matches only
packets that enter on lo, so it has no effect unless the VIP is a local
address.

Fixes #22701

Change-Id: I94563d2b3b989f29a737de1e377ab59f9e25fc2c

Signed-off-by: Roman Nazarkin <[email protected]>
Signed-off-by: Brendan Creane <[email protected]>
Co-authored-by: Roman Nazarkin <[email protected]>
2026-12-04 12:19:31 -08:00
..