1
0
Fork 0

hosts/beryllium: use named routing table

This commit is contained in:
clerie 2022-12-29 22:50:34 +01:00
parent b3ef4e6bde
commit bba5d8c044
1 changed files with 8 additions and 3 deletions

View File

@ -20,14 +20,19 @@
networking.hostName = "beryllium";
networking.iproute2.enable = true;
networking.iproute2.rttablesExtraConfig = ''
200 wg-clerie
'';
petabyte.policyrouting = {
enable = true;
rules6 = [
{ rule = "from 2a01:4f8:c0c:15f1::8107/128 lookup 200"; prio = 20000; }
{ rule = "from 2a01:4f8:c0c:15f1::8107/128 lookup wg-clerie"; prio = 20000; }
{ rule = "from 2a01:4f8:c0c:15f1::8107/128 unreachable"; prio = 20001; }
];
rules4 = [
{ rule = "from 10.20.30.107/32 lookup 200"; prio = 20000; }
{ rule = "from 10.20.30.107/32 lookup wg-clerie"; prio = 20000; }
{ rule = "from 10.20.30.107/32 unreachable"; prio = 20001; }
];
};
@ -37,7 +42,7 @@
networking.wireguard.interfaces = {
wg-clerie = {
ips = [ "2a01:4f8:c0c:15f1::8107/128" "10.20.30.107/32" ];
table = "200";
table = "wg-clerie";
peers = [
{
endpoint = "vpn.clerie.de:51820";