From da1d8d1d2a57c1082696e7180641989e6bfb65d4 Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Fri, 27 Jul 2018 13:28:35 +0200 Subject: [PATCH] Debug wireguard --- common/default.nix | 1 + hosts/apollo/configuration.nix | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/default.nix b/common/default.nix index c9e055e0..39dfdc05 100644 --- a/common/default.nix +++ b/common/default.nix @@ -14,6 +14,7 @@ with lib; m-0.hosts = mkOption { type = types.attrs; default = let p = config.m-0.prefix; in { + hera-v4 = "213.136.94.190"; hera = "${p}::1"; hera-intern = "${p}::3:1"; git = "${p}::3:2"; diff --git a/hosts/apollo/configuration.nix b/hosts/apollo/configuration.nix index 7686c8a2..6fb8a7ef 100644 --- a/hosts/apollo/configuration.nix +++ b/hosts/apollo/configuration.nix @@ -19,13 +19,13 @@ networking = { hostName = "apollo"; wireguard.interfaces = { wireguard = { - ips = [ "${hosts.apollo}/128" ]; + ips = [ "${hosts.apollo}/64" ]; privateKeyFile = "/etc/nixos/hosts/apollo/secret/wireguard-private"; peers = [ { publicKey = wireguard.pub.hera; - allowedIPs = [ "::/0" ]; - endpoint = "hera.m-0.eu:${wireguard.port}"; + allowedIPs = [ "${hosts.hera}/64" ]; + endpoint = "${hosts.hera-v4}:${builtins.toString wireguard.port}"; presharedKeyFile = "/etc/nixos/common/secret/wireguard-psk"; } ];