1
0
Fork 0

Debug wireguard

This commit is contained in:
Malte Brandy 2018-07-27 14:54:13 +02:00
parent 0f0d4ad231
commit cf58f48793
3 changed files with 9 additions and 8 deletions

View file

@ -16,7 +16,7 @@ with lib;
default = let p = config.m-0.prefix; in {
hera-v4 = "213.136.94.190";
hera = "${p}::1";
hera-wg = "${p}::2";
hera-wg = "${p}::1:0:1";
hera-intern = "${p}::3:1";
git = "${p}::3:2";
borg = "${p}::3:3";
@ -24,6 +24,7 @@ with lib;
blog = "${p}::3:6";
chor = "${p}::3:7";
matrix = "${p}::3:8";
apollo-wg = "${p}::1:1:1";
apollo = "${p}::1:1";
athene = "${p}::2:1";
};

View file

@ -18,14 +18,14 @@ imports = [
networking = {
hostName = "apollo";
wireguard.interfaces = {
wireguard = {
ips = [ "${hosts.apollo}/64" ];
m0wire = {
ips = [ "${hosts.apollo-wg}/96" ];
privateKeyFile = "/etc/nixos/hosts/apollo/secret/wireguard-private";
peers = [
{
publicKey = wireguard.pub.hera;
allowedIPs = [ "${hosts.hera}/64" ];
endpoint = "${hosts.hera-v4}:${builtins.toString wireguard.port}";
allowedIPs = [ "${hosts.hera-wg}/128" ];
endpoint = "hera.m-0.eu:${builtins.toString wireguard.port}";
presharedKeyFile = "/etc/nixos/common/secret/wireguard-psk";
}
];

View file

@ -33,14 +33,14 @@ networking = {
};
nameservers = [ "213.136.95.10" "2a02:c207::1:53" "2a02:c207::2:53" ];
wireguard.interfaces = {
wireguard = {
ips = [ "${hosts.hera-wg}/128" ];
m0wire = {
ips = [ "${hosts.hera-wg}/96" ];
privateKeyFile = "/etc/nixos/hosts/hera/secret/wireguard-private";
listenPort = wireguard.port;
peers = [
{
publicKey = wireguard.pub.apollo;
allowedIPs = [ "${hosts.apollo}::/120" ];
allowedIPs = [ "${hosts.apollo-wg}/128" ];
presharedKeyFile = "/etc/nixos/common/secret/wireguard-psk";
}
];