diff options
| author | Mel <mel@rnrd.eu> | 2026-04-22 05:18:10 +0200 |
|---|---|---|
| committer | Mel <mel@rnrd.eu> | 2026-04-22 05:29:05 +0200 |
| commit | cdcbf4599d615253103210bd37f09c2592be0e03 (patch) | |
| tree | e9b8ee2e80253c24d0097d1060d7b5a5c9f66c99 /modules/vpn/ingress.nix | |
| parent | 7408a7acfe5bfeb392067e59ef2e41b8e0c02a83 (diff) | |
| download | network-cdcbf4599d615253103210bd37f09c2592be0e03.tar.zst network-cdcbf4599d615253103210bd37f09c2592be0e03.zip | |
Let systemd-networkd handle VPN egress interface on ingress machine
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'modules/vpn/ingress.nix')
| -rw-r--r-- | modules/vpn/ingress.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/vpn/ingress.nix b/modules/vpn/ingress.nix index cc55fbb..2a6a582 100644 --- a/modules/vpn/ingress.nix +++ b/modules/vpn/ingress.nix @@ -25,6 +25,7 @@ let ingressName = index: "vpn-ingress${toString index}"; egressName = "vpn-egress0"; + egressAddress = "10.123.255.1/30"; egressHost = name: "${name}.rnrd.eu"; in @@ -81,7 +82,11 @@ in { "20-${egressName}" = { name = egressName; - linkConfig.ActivationPolicy = "up"; + address = [ egressAddress ]; + linkConfig = { + ActivationPolicy = "up"; + RequiredForOnline = "no"; # does not count as online + }; routes = [ { Destination = "0.0.0.0/0"; @@ -131,7 +136,7 @@ in type = "tun"; tag = inboundName; interface_name = egressName; - address = [ "10.123.255.1/30" ]; + address = [ egressAddress ]; auto_route = false; # we route manually strict_route = false; endpoint_independent_nat = true; |
