1
0
Fork 0

nixbld: fix altnet routing

This commit is contained in:
Sebastien Bourdeauducq 2023-07-13 18:25:05 +08:00
parent 4d17e7c293
commit 6ec5e436a2
1 changed files with 8 additions and 1 deletions

View File

@ -204,6 +204,13 @@ in
address = "103.206.98.200"; address = "103.206.98.200";
prefixLength = 29; prefixLength = 29;
}]; }];
ipv4.routes = [
{
address = "103.206.98.200";
prefixLength = 29;
options.table = "1";
}
];
}; };
}; };
boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = "1"; boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = "1";
@ -239,7 +246,7 @@ in
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
RemainAfterExit = true; RemainAfterExit = true;
ExecStart = "${pkgs.iproute2}/bin/ip rule add from 103.206.98.200/29 table 1"; ExecStart = "${pkgs.iproute2}/bin/ip rule add from 103.206.98.0/24 table 1";
ExecStop = "${pkgs.iproute2}/bin/ip rule del table 1"; ExecStop = "${pkgs.iproute2}/bin/ip rule del table 1";
}; };
}; };