nixos/britway: Add tailscale
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 19m49s
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 19m49s
This commit is contained in:
@@ -102,6 +102,16 @@ in
|
||||
{
|
||||
matchConfig.Name = "as211024";
|
||||
networkConfig.IPv6AcceptRA = mkForce false;
|
||||
routes = map (r: { routeConfig = r; }) [
|
||||
{
|
||||
Destination = lib.my.c.colony.prefixes.all.v4;
|
||||
Gateway = allAssignments.estuary.as211024.ipv4.address;
|
||||
}
|
||||
{
|
||||
Destination = lib.my.c.home.prefixes.all.v4;
|
||||
Gateway = lib.my.c.home.vips.as211024.v4;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
@@ -122,7 +132,17 @@ in
|
||||
};
|
||||
|
||||
firewall = {
|
||||
trustedInterfaces = [ "as211024" ];
|
||||
trustedInterfaces = [ "as211024" "tailscale0" ];
|
||||
extraRules = ''
|
||||
table inet nat {
|
||||
chain postrouting {
|
||||
iifname tailscale0 oifname veth0 snat ip to ${assignments.vultr.ipv4.address}
|
||||
iifname tailscale0 oifname veth0 snat ip6 to ${assignments.vultr.ipv6.address}
|
||||
iifname tailscale0 oifname as211024 snat ip to ${assignments.as211024.ipv4.address}
|
||||
iifname tailscale0 oifname as211024 snat ip6 to ${assignments.as211024.ipv6.address}
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user