Add virtual ips for the gre tunnel

Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
Egor Savkin 2024-09-23 13:36:17 +08:00
parent c7dff35280
commit 12af7ce0ad
1 changed files with 4 additions and 4 deletions

View File

@ -237,15 +237,15 @@ in
interfaces.intl0 = {
ipv4.addresses = [
{
address = "5.78.16.0";
prefixLength = 32;
address = "10.47.3.2";
prefixLength = 30;
}
];
ipv4.routes = [
{
address = "0.0.0.0";
prefixLength = 0;
via = "5.78.16.0";
via = "10.47.3.0";
options.table = "3";
}
];
@ -347,7 +347,7 @@ in
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.iproute2}/bin/ip rule add from 5.78.16.0/32 table 3";
ExecStart = "${pkgs.iproute2}/bin/ip rule add from 10.47.3.0/30 table 3";
ExecStop = "${pkgs.iproute2}/bin/ip rule del table 3";
};
};