You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide mechanism for users to exclude interfaces from disco + endpoint advertisements #1552
Perhaps we could add TS_AVOID_PREFIX=10.5.4.0/24, which people could add to their /etc/default/tailscale. And then we could check that IPSet for discoverEndpoints and sending disco messages.
An IPSet is probably easier than an interface name. But I suppose we could also accept an interface name and map it to a prefix on start-up (or on a timer or major link change?).
Reacted by Tim White, WindyNova, notsilicon, Bryce Chidester, James Riley Wilburn, Frank Mao, Oji Ishimori, Ed Welch, Crowbar Z, Chris Hills @ Netomnia and 80 more
Reacted by Git'Fellow and nom3ad
Reacted by Philip Taron, Marcel Hamer, nom3ad and Accurio
But I agree there needs to be a plan for CLI and config overall. I guess ignored interfaces really is account specific. I could imagine difficult tailnets wanting that to differ.
I think we can get decent mileage out of a global option, although there's probably edge cases like "only use my static wireguard VPN on my personal account" or somesuch. But no way -> some way is an okay start.
If we aren't adding a flag, just adding hacks to ignore things like Zerotier, can we ignore existing wireguard tunnels as well? I have a P2P Wireguard link that shouldn't be used for tailscale to also shuffle traffic, double encryption isn't very nice on the CPU.
Reacted by Samuel Čavoj, Alekséi Naidénov, Mat Utter, atagen, qub, q4ffe0470ef4, ArcticLampyrid and Ivan Shapovalov
In the meantime, is there any way to make Tailscale use a specific interface? I'm currently having this problem, Tailscale is trying to use an interface that has no Internet access.
Reacted by atagen, qub, Andrew Philips, The Dark Jester, Tomas and Arkadiusz Kozdra
Yes, I'm using 1.32.2. The thing is this has not started to happen to me just now, I'm having this problem now because before the other network was "unidentified" but now that I've changed the config and that Windows has recognized it Tailscale wants to use it. I've posted in the forums but here are the interfaces:
Tailscale is also routing packets through an unwanted interface for me - any wg tunnel I have seems preferred over the actual local ethernet.
This has effects from unwanted latency to outright breaking magicDNS and/or tailscale depending on how else things are configured.
In an odd twist, I've noticed tailscale netcheck shows my correct public IP, but tailscale status on other machines (and their latency) suggest I am connected over the wg tunnel. So at some point it has to be accessing the correct interface, but still ends up routing elsewhere.
I use tailscale to mesh my kubernetes cluster together. The nodes also get an ip from the CNI (cilium) and after a while tailscale prefers the internal link which causes routing loops and the consumpion of all the cpu. I think this feature where i can select an external interface for tailscale or exclude ip ranges will fix my issue.
Noticed this today when I found Tailscale was bound to (and routing traffic over) what is supposed to be an internal iSCSI VLAN on one of my Proxmox nodes.
It bite me for 2 days when using tailnet with k8s + calico, currently using patch #17762 to solve this problem.
expecting a happy ending for this 4 years old issue, this indeed a essential feature for me and I am counting on it.
I think that something like #17762 would fix the problems we're seeing. We use unikraft to create about 10k interfaces and probing all of those interfaces is spinning tailscale's wheels. Unikraft is maintaining a fork, but it would be much nicer to have a configuration option to prevent this.
I also ran into a use case where this is being a blocker for me and ended up here, is almost 5 years since this issue was made, is there any specific blocker into why it can not be implemented?
Ran into this issue now for a multi-cloud k8s cluster, where the default networking setup we have makes a vxlan interface over the tailscale connection, then tailscale discovers it and tries to route over it occasionally, breaking the connection and causing node issues. Would love to be able to exclude some interfaces, as in: #17762
Ran into this issue now for a multi-cloud k8s cluster, where the default networking setup we have makes a vxlan interface over the tailscale connection, then tailscale discovers it and tries to route over it occasionally, breaking the connection and causing node issues. Would love to be able to exclude some interfaces, as in: #17762
Incidentally, we worked around this issue in our situation by adding a firewall rule to block discovery over the dispreferred interface:
# These rules block Tailscale disco probes (UDP 41641) on vxlan.calico
# to prevent path flapping caused by advertising unreachable overlay IPs
/usr/sbin/nft insert rule ip filter INPUT iifname "vxlan.calico" udp dport 41641 counter drop
/usr/sbin/nft insert rule ip filter OUTPUT oifname "vxlan.calico" udp dport 41641 counter drop
Using this on NixOS RKE2 Kubernetes cluster with Cilium / WireGuard with WAN worker nodes. Tailscale on the hosts, and Tailscale K8S Operator with proxy pods.
Took me a while to find this. Unusable performance before this change.
# Tailscale can discover Cilium's host address as a direct peer# endpoint. Allowing UDP transport through cilium_host creates a# pathological overlay path, so force peer transport to use the# node's external endpoint instead. This is intentionally limited to# Tailscale's WireGuard port and does not block Cilium traffic.networking.nftables.ruleset=lib.mkIfconfig.networking.nftables.enable'' table inet tailscale_cilium { chain output { type filter hook output priority -100; policy accept; oifname "cilium_host" udp dport 41641 drop comment "avoid Tailscale transport over Cilium host interface" } }'';
A related operational case: on Linux hosts with many container bridge interfaces, bridge addresses can be advertised as peer endpoints even when other nodes cannot route to those networks. Peers may then send discovery probes for those addresses through their default route. An egress firewall can block the unwanted traffic, but it does not remove the candidates or stop the probes from being generated.
A supported per-interface or CIDR exclusion for endpoint advertisement and discovery would help prevent this while preserving discovery on intended LANs. Is there a supported approach in current releases, or an update on the direction proposed in #17762? A synthetic network-namespace reproducer would be useful to test a fix.
Activity
danderson commentedon Mar 21, 2021
We already have a hack to skip ZeroTier interfaces - we should add Nebula interfaces to that as well.
More flags, more options: not a huge fan, but if we're getting to a world with a nicer CLI that can blend with daemon flags, I guess it's okay.
bradfitz commentedon Mar 21, 2021
It could be just an environment variable for now. But that's hard for Windows users and doesn't work at all currently with netext/sysext macOS.
bradfitz commentedon Mar 21, 2021
But I agree there needs to be a plan for CLI and config overall. I guess ignored interfaces really is account specific. I could imagine difficult tailnets wanting that to differ.
danderson commentedon Mar 22, 2021
I think we can get decent mileage out of a global option, although there's probably edge cases like "only use my static wireguard VPN on my personal account" or somesuch. But no way -> some way is an okay start.
DentonGentry commentedon Sep 4, 2021
Some overlap with feature request in #1066 (where the discussion is mostly about multilink and/or bonding)
timwhite commentedon Dec 23, 2021
If we aren't adding a flag, just adding hacks to ignore things like Zerotier, can we ignore existing wireguard tunnels as well? I have a P2P Wireguard link that shouldn't be used for tailscale to also shuffle traffic, double encryption isn't very nice on the CPU.
parasiteoflife commentedon Nov 14, 2022
In the meantime, is there any way to make Tailscale use a specific interface? I'm currently having this problem, Tailscale is trying to use an interface that has no Internet access.
DentonGentry commentedon Nov 14, 2022
Are you using 1.32.2? #5940 improved detection of which interface to use, and went into 1.32.2.
parasiteoflife commentedon Nov 14, 2022
Yes, I'm using 1.32.2. The thing is this has not started to happen to me just now, I'm having this problem now because before the other network was "unidentified" but now that I've changed the config and that Windows has recognized it Tailscale wants to use it. I've posted in the forums but here are the interfaces:
I've managed to make Tailscale login by disabling the Mellanox adapter but after enabling it again it seems it wants to use it no matter what.
atagen commentedon Dec 30, 2022
Tailscale is also routing packets through an unwanted interface for me - any wg tunnel I have seems preferred over the actual local ethernet.
This has effects from unwanted latency to outright breaking magicDNS and/or tailscale depending on how else things are configured.
In an odd twist, I've noticed
tailscale netcheckshows my correct public IP, buttailscale statuson other machines (and their latency) suggest I am connected over the wg tunnel. So at some point it has to be accessing the correct interface, but still ends up routing elsewhere.oscrx commentedon Jan 2, 2023
I use tailscale to mesh my kubernetes cluster together. The nodes also get an ip from the CNI (cilium) and after a while tailscale prefers the internal link which causes routing loops and the consumpion of all the cpu. I think this feature where i can select an external interface for tailscale or exclude ip ranges will fix my issue.
57 remaining items
net/netmon: add support for `$TS_{ONLY,AVOID}_INTERFACES`
net/netmon: add support for `$TS_AVOID_PREFIX`
luckman212 commentedon Dec 4, 2025
Noticed this today when I found Tailscale was bound to (and routing traffic over) what is supposed to be an internal iSCSI VLAN on one of my Proxmox nodes.
Definitely a much needed feature!
will4j commentedon Dec 8, 2025
It bite me for 2 days when using tailnet with k8s + calico, currently using patch #17762 to solve this problem.
expecting a happy ending for this 4 years old issue, this indeed a essential feature for me and I am counting on it.
pcn commentedon Dec 22, 2025
I think that something like #17762 would fix the problems we're seeing. We use unikraft to create about 10k interfaces and probing all of those interfaces is spinning tailscale's wheels. Unikraft is maintaining a fork, but it would be much nicer to have a configuration option to prevent this.
will4j commentedon Dec 29, 2025
FYI, a new flag
--relay-server-static-endpointswas added to support configuring static endpoint in tailscale version v1.92.1, see docs here.but the ability to exclude specific device by cidr is still needed in my use case.
rem1niscence commentedon Jan 7, 2026
I also ran into a use case where this is being a blocker for me and ended up here, is almost 5 years since this issue was made, is there any specific blocker into why it can not be implemented?
larsyencken commentedon Feb 4, 2026
Ran into this issue now for a multi-cloud k8s cluster, where the default networking setup we have makes a vxlan interface over the tailscale connection, then tailscale discovers it and tries to route over it occasionally, breaking the connection and causing node issues. Would love to be able to exclude some interfaces, as in: #17762
larsyencken commentedon May 8, 2026
Incidentally, we worked around this issue in our situation by adding a firewall rule to block discovery over the dispreferred interface:
J-Prince commentedon May 12, 2026
Very good idea, but I tried the same thing on OpenWRT, and wasn't able to prevent Tailscale from using another Wireguard available on the same router.
sedlund commentedon Sep 14, 2026
Using this on NixOS RKE2 Kubernetes cluster with Cilium / WireGuard with WAN worker nodes. Tailscale on the hosts, and Tailscale K8S Operator with proxy pods.
Took me a while to find this. Unusable performance before this change.
fix(net): keep tailscaled off flannel's interfaces so cross-node pod …
baditaflorin commentedon Nov 17, 2026
A related operational case: on Linux hosts with many container bridge interfaces, bridge addresses can be advertised as peer endpoints even when other nodes cannot route to those networks. Peers may then send discovery probes for those addresses through their default route. An egress firewall can block the unwanted traffic, but it does not remove the candidates or stop the probes from being generated.
A supported per-interface or CIDR exclusion for endpoint advertisement and discovery would help prevent this while preserving discovery on intended LANs. Is there a supported approach in current releases, or an update on the direction proposed in #17762? A synthetic network-namespace reproducer would be useful to test a fix.