diff --git a/ops/nixos/swann/default.nix b/ops/nixos/swann/default.nix index 138d78dac2..0b6454835f 100644 --- a/ops/nixos/swann/default.nix +++ b/ops/nixos/swann/default.nix @@ -157,6 +157,16 @@ in { ''; addRules = map ruleToLine rules; in '' + # Fix Tailscale, by adding routing rules just before the one they add at prio 5200. + ip -4 rule del priority 5196 || true + ip -4 rule del priority 5197 || true + ip -4 rule del priority 5198 || true + ip -4 rule del priority 5199 || true + ip -4 rule add from all fwmark 0x80000 lookup 150 priority 5196 + ip -4 rule add from all fwmark 0x80000 lookup 151 priority 5197 + ip -4 rule add from all fwmark 0x80000 lookup 152 priority 5198 + ip -4 rule add from all fwmark 0x80000 lookup 153 priority 5199 + ${lib.concatStringsSep "\n" clearRules} ${lib.concatStringsSep "\n" addRules}