diff --git a/group_vars/.template b/group_vars/.template index ee57562..1fe24fd 100644 --- a/group_vars/.template +++ b/group_vars/.template @@ -16,6 +16,7 @@ postfix_smtp_user: # VPN network variables vpn_wg0_port: vpn_wg0_netmask: +vpn_wg0_subnet: vpn_wg0_preshared_key: # Service variables diff --git a/host_vars/.template b/host_vars/.template index e12688b..5bca599 100644 --- a/host_vars/.template +++ b/host_vars/.template @@ -22,8 +22,7 @@ vpn_wg0_interface_private_key: vpn_wg0_peer_public_key: vpn_wg0_endpoint_address: -vpn_wg0_subnet: -vpn_remote_subnet: +vpn_remote_br0_subnet: vpn_reverse_proxy_address: diff --git a/playbooks/filesystem/valkyrie/etc/network/interfaces.d/wg0.j2 b/playbooks/filesystem/valkyrie/etc/network/interfaces.d/wg0.j2 index 82e00e8..69587e2 100644 --- a/playbooks/filesystem/valkyrie/etc/network/interfaces.d/wg0.j2 +++ b/playbooks/filesystem/valkyrie/etc/network/interfaces.d/wg0.j2 @@ -6,9 +6,9 @@ iface wg0 inet static post-up /usr/local/sbin/post-up-$IFACE-inet.nft post-up /usr/local/sbin/post-up-$IFACE-ipv4.nft - post-up ip route add {{ vpn_remote_subnet }} dev $IFACE + post-up ip route add {{ vpn_remote_br0_subnet }} dev $IFACE - pre-down ip route del {{ vpn_remote_subnet }} dev $IFACE + pre-down ip route del {{ vpn_remote_br0_subnet }} dev $IFACE pre-down /usr/local/sbin/pre-down-$IFACE-ipv4.nft pre-down /usr/local/sbin/pre-down-$IFACE-inet.nft diff --git a/playbooks/filesystem/valkyrie/etc/wireguard/wg0.conf.j2 b/playbooks/filesystem/valkyrie/etc/wireguard/wg0.conf.j2 index 85a2910..6e79773 100644 --- a/playbooks/filesystem/valkyrie/etc/wireguard/wg0.conf.j2 +++ b/playbooks/filesystem/valkyrie/etc/wireguard/wg0.conf.j2 @@ -5,4 +5,4 @@ ListenPort = {{ vpn_wg0_port }} [Peer] PublicKey = {{ vpn_wg0_peer_public_key }} PresharedKey = {{ vpn_wg0_preshared_key }} -AllowedIPs = {{ vpn_wg0_subnet }},{{ vpn_remote_subnet }} +AllowedIPs = {{ vpn_wg0_subnet }},{{ vpn_remote_br0_subnet }}