From 7e145040cc0610f96aea8a4805f7dd29c846e3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Yule=20B=C3=A4dorf?= Date: Fri, 12 Apr 2024 22:31:28 +0200 Subject: [PATCH 1/2] wireguard: use IP addresses for wireguard endpoints Otherwise the hostnames written to the /etc/hosts file are already pointing at the wireguard IP-addresses, so they can never connect. --- hosts/flora-6/wireguard.nix | 2 +- hosts/nachtigall/wireguard.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/flora-6/wireguard.nix b/hosts/flora-6/wireguard.nix index 83406ba..757bc87 100644 --- a/hosts/flora-6/wireguard.nix +++ b/hosts/flora-6/wireguard.nix @@ -19,7 +19,7 @@ privateKeyFile = config.age.secrets.wg-private-key.path; peers = flake.self.logins.admins.wireguardDevices ++ [ { - endpoint = "nachtigall.pub.solar:51820"; + endpoint = "138.201.80.102:51820"; publicKey = "qzNywKY9RvqTnDO8eLik75/SHveaSk9OObilDzv+xkk="; allowedIPs = [ "10.7.6.1/32" "fd00:fae:fae:fae:fae:1::/96" ]; } diff --git a/hosts/nachtigall/wireguard.nix b/hosts/nachtigall/wireguard.nix index 7b8d6f4..3576123 100644 --- a/hosts/nachtigall/wireguard.nix +++ b/hosts/nachtigall/wireguard.nix @@ -19,7 +19,7 @@ privateKeyFile = config.age.secrets.wg-private-key.path; peers = flake.self.logins.admins.wireguardDevices ++ [ { - endpoint = "flora-6.pub.solar:51820"; + endpoint = "80.71.153.210:51820"; publicKey = "jtSR5G2P/nm9s8WrVc26Xc/SQLupRxyXE+5eIeqlsTU="; allowedIPs = [ "10.7.6.2/32" "fd00:fae:fae:fae:fae:2::/96" ]; } -- 2.44.2 From b6a54efd9a7f39516edd4f8af3bae0cb80460c84 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 12 Apr 2024 22:36:17 +0200 Subject: [PATCH 2/2] fix: add comment with hostnames to wireguard peers --- hosts/flora-6/wireguard.nix | 2 +- hosts/nachtigall/wireguard.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/flora-6/wireguard.nix b/hosts/flora-6/wireguard.nix index 757bc87..cc9b6b7 100644 --- a/hosts/flora-6/wireguard.nix +++ b/hosts/flora-6/wireguard.nix @@ -18,7 +18,7 @@ ]; privateKeyFile = config.age.secrets.wg-private-key.path; peers = flake.self.logins.admins.wireguardDevices ++ [ - { + { # nachtigall.pub.solar endpoint = "138.201.80.102:51820"; publicKey = "qzNywKY9RvqTnDO8eLik75/SHveaSk9OObilDzv+xkk="; allowedIPs = [ "10.7.6.1/32" "fd00:fae:fae:fae:fae:1::/96" ]; diff --git a/hosts/nachtigall/wireguard.nix b/hosts/nachtigall/wireguard.nix index 3576123..8544918 100644 --- a/hosts/nachtigall/wireguard.nix +++ b/hosts/nachtigall/wireguard.nix @@ -18,7 +18,7 @@ ]; privateKeyFile = config.age.secrets.wg-private-key.path; peers = flake.self.logins.admins.wireguardDevices ++ [ - { + { # flora-6.pub.solar endpoint = "80.71.153.210:51820"; publicKey = "jtSR5G2P/nm9s8WrVc26Xc/SQLupRxyXE+5eIeqlsTU="; allowedIPs = [ "10.7.6.2/32" "fd00:fae:fae:fae:fae:2::/96" ]; -- 2.44.2