Skip to content

netmon: add environment knobs to avoid interfaces or addresses#17762

Open
intelfx wants to merge 2 commits intotailscale:mainfrom
intelfx:work/exclude
Open

netmon: add environment knobs to avoid interfaces or addresses#17762
intelfx wants to merge 2 commits intotailscale:mainfrom
intelfx:work/exclude

Conversation

@intelfx
Copy link
Copy Markdown

@intelfx intelfx commented Nov 4, 2025

This adds three environment variable knobs in total:

Each knob accepts a comma-separated list of masks: globs for interface names and prefixes for addresses.

Usage examples:

  • TS_ONLY_INTERFACES=en*,wl*
  • TS_AVOID_INTERFACES=tun*,wg*
  • TS_AVOID_PREFIX=10.1.2.0/24,2a01:2345:6789:abcd::/64

All constraints are additive and are considered in addition to the hardcoded ZeroTier exclusion.

Multiple redundant ways to exclude interfaces/addresses from consideration were implemented in order to cover all use-cases cited by the users in the issue comments.

Fixes #1552.

@intelfx intelfx changed the title netmon: add debug knobs to avoid interfaces or addresses netmon: add environment knobs to avoid interfaces or addresses Nov 4, 2025
Add a pair of knobs to selectively allow/disallow Tailscale to send
data over specific interfaces.

Fixes tailscale#1552.

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
In addition to the previous commit, add a knob to selectively disallow
Tailscale to use specific addresses as endpoints.

Fixes tailscale#1552.

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
intelfx added a commit to intelfx/admin that referenced this pull request Nov 8, 2025
Now that tailscale/tailscale#17762 is a thing and all of my stuff
runs it, forbid tailscaled from going over other VPNs.
@istathar
Copy link
Copy Markdown

It's possible that this would resolve #16652, though I'm a bit reluctant to rely on environmnet variables to deliver a key functionality that needs to be user-facing so non-developer uesrs can ensure the setting is applied.

@clstokes
Copy link
Copy Markdown
Contributor

Related: #15957.

@BelKirill
Copy link
Copy Markdown

Are there any news on this? Is there a workaround?

@ExoSkye
Copy link
Copy Markdown

ExoSkye commented Mar 23, 2026

Can this be merged? It would also be really useful for me since I have a Mullvad VPN connection over Wireguard and when my girlfriend's computer tries to talk to my server, it seems to get preferentially routed through the VPN, which for our usecases is very very slow and not at all adequate.
When forced to go "directly" ie not through the VPN, the internet speed is completely fine, so it'd be useful if I can force it to not use any Mullvad interfaces (I tend to connect to one specific one, so I'll just blacklist the interface which shares the name of the interface it uses).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide mechanism for users to exclude interfaces from disco + endpoint advertisements

5 participants