router, pre-router: move wireguard tunnel and change default route for router
This commit is contained in:
@@ -55,34 +55,6 @@
|
||||
{ address = "10.42.0.0"; prefixLength = 16; via = "10.42.10.1"; }
|
||||
];
|
||||
|
||||
networking.wireguard = {
|
||||
enable = true;
|
||||
interfaces = {
|
||||
wg0 = {
|
||||
ips = [ "fe80::42:10:1/64" ];
|
||||
privateKeyFile = "/var/src/secrets/wireguard/wg0";
|
||||
allowedIPsAsRoutes = false;
|
||||
peers = [{
|
||||
publicKey = "Y++eB9SfU17zB4mJ/6AaN761tngXAyTNoVaPNKmuvls=";
|
||||
allowedIPs = [ "::/0" ];
|
||||
endpoint = "78.47.183.82:51876";
|
||||
#endpoint = "gatekeeper.net.clerie.de:51876";
|
||||
persistentKeepalive = 25;
|
||||
}];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.localCommands = ''
|
||||
ip -6 route add default dev wg0 table 100
|
||||
'';
|
||||
|
||||
clerie.policyrouting.enable = true;
|
||||
clerie.policyrouting.rules6 = [
|
||||
{ rule = "lookup main suppress_prefixlength 0"; prio = 10000; }
|
||||
{ rule = "from 2a01:4f8:1c0c:8221::/64 lookup 100"; prio = 19000; }
|
||||
];
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
|
Reference in New Issue
Block a user