Private-range bypass has no IPv6 defaults, so link-local and multicast are hijacked and LAN discovery breaks
Operating system
Linux
System version
debian
Installation type
deb
Version
1.3.0
Description
defaultTunPrivateRanges() is IPv4-only, and generate.cpp hard-codes 127.0.0.0/8 and 255.255.255.255/32 next to it. There is no IPv6 equivalent for ::1/128, fe80::/10, fc00::/7 or ff00::/8. 200::/7
As a result, with IPv6 enabled everything link-local and multicast is pulled into the tunnel. Anything on the LAN that talks over IPv6 link-local or multicast — service discovery, mDNS, peer announcements — stops working while a profile is running, and connections from other LAN hosts to this machine's link-local address are refused as loops.
In my case it's a mesh node (Yggdrasil) that listens on a link-local address for LAN peers and announces itself over multicast: with any profile active, LAN peers can no longer reach it, and the error below repeats every ~15 s. The same would hit any overlay or discovery protocol that relies on link-local IPv6.
Reproduction
- Linux, TUN mode with auto_redirect and IPv6 enabled.
- Run any service that listens on an IPv6 link-local address of a LAN interface (here: a mesh daemon's LAN peer listener).
- From another host on the LAN, connect to that link-local address: refused while a profile is active.
nft list table inet sing-boxshows the IPv4 exemption and nothing comparable for IPv6: ip daddr { 10.0.0.0/8, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.168.0.0/16, 224.0.0.0/4, 255.255.255.255 } counter return The only IPv6 addresses left alone are the ones in the auto-built local-address set.- Adding ::1/128, fe80::/10, fc00::/7 and ff00::/8 to the private-range list by hand fixes it — the list goes straight into route_exclude_address, so sing-box sorts them per family.
Since 1.3.0 made the list editable, this is easy to work around, but the defaults are the IPv4 half of the same idea. Could the IPv6 ranges be shipped as defaults too, with ::1/128 alongside the hard-coded 127.0.0.0/8?
Logs
ERROR connection: open connection to [fe80::…]:9002 using outbound/direct[direct]:
loopback connection to TUN rangeSource: throneproj/Throne