-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protect local subnets from being routed toward Tailscale subnets if they collide #201
Protect local subnets from being routed toward Tailscale subnets if they collide #201
Conversation
I've added a warning into the log, that there are colliding subnets when the add-on starts (this is independent of the permanently active, higher priority ip rule redirection). Tested on 3 real devices, seems to be solid. |
Fixed IPv6 handling. |
737f8ec
to
ed2347d
Compare
ed2347d
to
63cbf5e
Compare
Added handling local network changes (eg. from the UI changing IP, mask, etc.). Moved the functionality to a new s6 service. Eg. when NetworkManager reported the manual removal of IPv6 IP address, the ip rules (protecting the local subnets from collision/redirection) got recalculated.
|
3a4093a
to
b0191b8
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
de64b21
to
765875a
Compare
765875a
to
1fa2f89
Compare
1fa2f89
to
8a11c91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. :) Though it has 2 logical bugs/issues:
I think 1. needs a new PR, 2. can stay as is. What do you think? |
Note: this is based on / continuation of #199, but I will rebase this PR as required.
Proposed Changes
TLDR:
ip rule add to "${route}" priority 5000 table main
for each advertised local subnetsip rule del to "${route}"
for each previously added subnetsIdea is stolen from: tailscale/tailscale#6231 (comment) (Workaround 3)
Reason: Tailscale adds it's own routes with higher priority than the "normal" route settings, so we add back the local subnets with even higher priority. Tailscale wants to forward the local domain in case it is a coffee shop WiFi that collides with our tailnet settings, but in a server's case, it causes issues.
When Tailscale provides a solution for this old issue (tailscale/tailscale#1227), we can remove this workaround.
ip rule list
when the add-on is active/started:Tested on real HA OS, RPI 3 config, it didn't lost its network access when there were active colliding subnet routing,
though I didn't make a "negative" test, that without this PR my RPI gets "bricked" with the same config. UPDATE: I made this "negative" test unintentionally, so this PR really protects the access to the device.Related Issues