1
0

Wireguard between nonat and porter

This commit is contained in:
clerie 2020-12-15 18:13:56 +01:00
parent 4198653fd6
commit f39aa5037b
2 changed files with 32 additions and 0 deletions

View File

@ -38,5 +38,21 @@
];
};
networking.wireguard.enable = true;
networking.wireguard.interfaces = {
wg-porter = {
peers = [ {
allowedIPs = [ "0.0.0.0/0" "::/0" ];
endpoint = "porter.net.clerie.de:51337";
publicKey = "TzQV60SvPZuJ9yTzvyGwejyXw1SlKkilS4UUvrQcyGk=";
} ];
listenPort = 51337;
allowedIPsAsRoutes = false;
privateKeyFile = "/var/src/secrets/wireguard/wg-porter";
} // (import ../../lib/link-local-wireguard.nix {}).llIPv6 "fe80::1337:2" "fe80::1337:1" "wg-porter";
};
networking.firewall.allowedUDPPorts = [ 51337 ];
system.stateVersion = "21.03";
}

View File

@ -20,5 +20,21 @@
networking.defaultGateway6 = { address = "fe80::1"; interface = "ens3"; };
networking.nameservers = [ "213.133.98.98" "213.133.99.99" "213.133.100.100" ];
networking.wireguard.enable = true;
networking.wireguard.interfaces = {
wg-nonat = {
peers = [ {
allowedIPs = [ "0.0.0.0/0" "::/0" ];
endpoint = "nonat.net.clerie.de:51337";
publicKey = "Z5HltUKBSOzePqZCJjSsJPZ3UxGjFR4a5Vxmm+ePNRk=";
} ];
listenPort = 51337;
allowedIPsAsRoutes = false;
privateKeyFile = "/var/src/secrets/wireguard/wg-nonat";
} // (import ../../lib/link-local-wireguard.nix {}).llIPv6 "fe80::1337:1" "fe80::1337:2" "wg-nonat";
};
networking.firewall.allowedUDPPorts = [ 51337 ];
system.stateVersion = "21.03";
}