diff options
author | Patrick Spek <p.spek@tyil.nl> | 2024-03-05 16:26:23 +0100 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2024-03-05 16:26:23 +0100 |
commit | 7b46c788af44a03692ac995de0b74281b9b7aaf4 (patch) | |
tree | 1cc4ad26394447a0846fed7cab39af6850dc0d95 | |
parent | 6a2070213b832f8d0856d1f100fc8de7093ff8c7 (diff) |
Update vpn-wireguard playbook for dualstack
-rw-r--r-- | hosts.d/ricui.tyil.net | 1 | ||||
-rw-r--r-- | playbooks.d/vpn-wireguard/playbook.bash | 6 | ||||
-rw-r--r-- | 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} |