From 55f5e2a8f76ae4ef8ad528b225fb9bc287b20d37 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Fri, 9 Jul 2021 17:29:12 +0200 Subject: [PATCH] wip --- bundles/wireguard/metadata.py | 2 ++ nodes/netcup.secondary.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bundles/wireguard/metadata.py b/bundles/wireguard/metadata.py index 9d1d4c8..13cd9e3 100644 --- a/bundles/wireguard/metadata.py +++ b/bundles/wireguard/metadata.py @@ -39,6 +39,7 @@ def systemd_networkd_networks(metadata): 'Route': { 'Destination': str(ip_interface(metadata.get('wireguard/my_ip')).network), 'GatewayOnlink': 'yes', + 'PreferredSource': str(ip_interface(metadata.get('network/internal/ipv4')).ip), }, 'Network': { 'DHCP': 'no', @@ -54,6 +55,7 @@ def systemd_networkd_networks(metadata): 'Destination': route, 'Gateway': str(ip_interface(repo.get_node(peer).metadata.get(f'wireguard/my_ip')).ip), 'GatewayOnlink': 'yes', + 'PreferredSource': str(ip_interface(metadata.get('network/internal/ipv4')).ip), } }) diff --git a/nodes/netcup.secondary.py b/nodes/netcup.secondary.py index ff520e6..9a45c6d 100644 --- a/nodes/netcup.secondary.py +++ b/nodes/netcup.secondary.py @@ -18,7 +18,7 @@ }, 'internal': { 'interface': 'eth1', - 'ipv4': '10.0.11.2', + 'ipv4': '10.0.11.2/24', }, }, 'wireguard': {