hosts/beryllium: use named routing table
This commit is contained in:
parent
b3ef4e6bde
commit
bba5d8c044
@ -20,14 +20,19 @@
|
|||||||
|
|
||||||
networking.hostName = "beryllium";
|
networking.hostName = "beryllium";
|
||||||
|
|
||||||
|
networking.iproute2.enable = true;
|
||||||
|
networking.iproute2.rttablesExtraConfig = ''
|
||||||
|
200 wg-clerie
|
||||||
|
'';
|
||||||
|
|
||||||
petabyte.policyrouting = {
|
petabyte.policyrouting = {
|
||||||
enable = true;
|
enable = true;
|
||||||
rules6 = [
|
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; }
|
{ rule = "from 2a01:4f8:c0c:15f1::8107/128 unreachable"; prio = 20001; }
|
||||||
];
|
];
|
||||||
rules4 = [
|
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; }
|
{ rule = "from 10.20.30.107/32 unreachable"; prio = 20001; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@ -37,7 +42,7 @@
|
|||||||
networking.wireguard.interfaces = {
|
networking.wireguard.interfaces = {
|
||||||
wg-clerie = {
|
wg-clerie = {
|
||||||
ips = [ "2a01:4f8:c0c:15f1::8107/128" "10.20.30.107/32" ];
|
ips = [ "2a01:4f8:c0c:15f1::8107/128" "10.20.30.107/32" ];
|
||||||
table = "200";
|
table = "wg-clerie";
|
||||||
peers = [
|
peers = [
|
||||||
{
|
{
|
||||||
endpoint = "vpn.clerie.de:51820";
|
endpoint = "vpn.clerie.de:51820";
|
||||||
|
Loading…
Reference in New Issue
Block a user