Skip to content

Instantly share code, notes, and snippets.

@rwanyoike
Created October 3, 2024 16:39
Show Gist options
  • Save rwanyoike/1420404a2fabecb8607199788514afff to your computer and use it in GitHub Desktop.
Save rwanyoike/1420404a2fabecb8607199788514afff to your computer and use it in GitHub Desktop.
Workaround for routing table rules that will work with tailscaled (v1.12.0)
[Interface]
...
# Workaround for routing table rules that will work with tailscaled
# Ref: https://github.com/tailscale/tailscale/blob/v1.12.0/wgengine/router/router_linux.go#L628
# Ref (old): https://github.com/tailscale/tailscale/blob/b87396b/wgengine/router/router_linux.go#L508
FwMark = 0x19999
PostUp = ip -4 rule del not fwmark 0x19999 table 0x19999
PostUp = ip -4 rule add pref 9001 not fwmark 0x19999 table 0x19999
PostUp = ip -4 rule del table main suppress_prefixlength 0
PostUp = ip -4 rule add pref 9000 table main suppress_prefixlength 0
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment