From a4b309e27214daf98c70676324418e23578ede22 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 17 Oct 2021 21:16:40 +0200 Subject: yggdrasil-wg: ... --- hosts/vidhar/default.nix | 3 +++ modules/yggdrasil-wg/default.nix | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix index 3c6aeb16..107906c7 100644 --- a/hosts/vidhar/default.nix +++ b/hosts/vidhar/default.nix @@ -85,6 +85,9 @@ allowedTCPPorts = [ 22 # ssh ]; + allowedUDPPorts = [ + 51820 # wireguard + ]; allowedUDPPortRanges = [ { from = 60000; to = 61000; } # mosh ]; diff --git a/modules/yggdrasil-wg/default.nix b/modules/yggdrasil-wg/default.nix index fbb38d26..3bff6458 100644 --- a/modules/yggdrasil-wg/default.nix +++ b/modules/yggdrasil-wg/default.nix @@ -91,14 +91,11 @@ let }; linkConfig = { MACAddress = "${greHostMACPrefixes.${hostName}}:${hexIx}"; + RequiredForOnline = false; }; networkConfig = { - Tunnel = "yggre-${other}"; BatmanAdvanced = "yggdrasil"; }; - linkConfig = { - RequiredForOnline = false; - }; }; trim = str: if hasSuffix "\n" str then trim (removeSuffix "\n" str) else str; @@ -152,6 +149,9 @@ in { linkConfig = { RequiredForOnline = false; }; + networkConfig = { + Tunnel = map (opts@{from, to, ...}: let other = if from == hostName then to else from; in "yggre-${other}") hostLinks; + }; }; yggdrasil = { name = "yggdrasil"; -- cgit v1.2.3