From 7b46c788af44a03692ac995de0b74281b9b7aaf4 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Tue, 5 Mar 2024 16:26:23 +0100 Subject: Update vpn-wireguard playbook for dualstack --- hosts.d/ricui.tyil.net | 1 + playbooks.d/vpn-wireguard/playbook.bash | 6 ++++-- playbooks.d/vpn-wireguard/share/interface | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hosts.d/ricui.tyil.net b/hosts.d/ricui.tyil.net index 86281cf..4e09141 100644 --- a/hosts.d/ricui.tyil.net +++ b/hosts.d/ricui.tyil.net @@ -8,3 +8,4 @@ vpn-tinc.ipv4=10.57.20.7 vpn-tinc.ipv6=fd68:1057:1992:3381:0:1:1:3 vpn-wireguard.endpoint=2a01:4f8:1c1b:67d7::1 vpn-wireguard.ip=fd68:1058:1992:3381:0:1:1:3 +k8s-node.node-ip=fd68:1058:1992:3381:0:1:1:3 diff --git a/playbooks.d/vpn-wireguard/playbook.bash b/playbooks.d/vpn-wireguard/playbook.bash index a8ed753..82b7286 100644 --- a/playbooks.d/vpn-wireguard/playbook.bash +++ b/playbooks.d/vpn-wireguard/playbook.bash @@ -3,7 +3,8 @@ # shellcheck disable=SC2034 BASHTARD_PLAYBOOK_VARS[$BASHTARD_PLAYBOOK.endpoint]="required" -BASHTARD_PLAYBOOK_VARS[$BASHTARD_PLAYBOOK.ip]="required" +BASHTARD_PLAYBOOK_VARS[$BASHTARD_PLAYBOOK.ipv4]="required" +BASHTARD_PLAYBOOK_VARS[$BASHTARD_PLAYBOOK.ipv6]="required" playbook_add() { local data @@ -62,7 +63,8 @@ playbook_sync() { # Write the Interface section file_template "interface" \ - ip="$(config "$BASHTARD_PLAYBOOK.ip")" \ + ipv4="$(config "$BASHTARD_PLAYBOOK.ipv4")" \ + ipv6="$(config "$BASHTARD_PLAYBOOK.ipv6")" \ port="$(config "$BASHTARD_PLAYBOOK.port" "51820")" \ privkey="$(cat "$data/privkey")" \ > "$wgconf" diff --git a/playbooks.d/vpn-wireguard/share/interface b/playbooks.d/vpn-wireguard/share/interface index 66cc0ca..00f53e8 100644 --- a/playbooks.d/vpn-wireguard/share/interface +++ b/playbooks.d/vpn-wireguard/share/interface @@ -1,4 +1,4 @@ [Interface] -Address = ${ip}/128 +Address = ${ipv6}/128,${ipv4}/32 ListenPort = ${port} PrivateKey = ${privkey} -- cgit v1.1