netmon: add environment knobs to avoid interfaces or addresses#17762
netmon: add environment knobs to avoid interfaces or addresses#17762intelfx wants to merge 2 commits intotailscale:mainfrom
Conversation
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>
Now that tailscale/tailscale#17762 is a thing and all of my stuff runs it, forbid tailscaled from going over other VPNs.
|
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. |
|
Related: #15957. |
|
Are there any news on this? Is there a workaround? |
|
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. |
This adds three environment variable knobs in total:
$TS_{ONLY,AVOID}_INTERFACESto control which interfaces Tailscale is allowed to consider for endpoints, and$TS_AVOID_PREFIX(using the name suggested in Provide mechanism for users to exclude interfaces from disco + endpoint advertisements #1552) to control which addresses Tailscale is allowed to consider as endpoints.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::/64All 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.