summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2024-03-07 10:26:15 +0100
committerPatrick Spek <p.spek@tyil.nl>2024-03-07 10:26:15 +0100
commit38cfea5edd1be39a431ca12af9a26a0406d7bbe1 (patch)
treea4b67329bf1f91f4dae803620f28602438290e6a
parent7342ab7fa3d763ef33e25cb4c832b85ab0dd4ad7 (diff)
Fix vpn-wireguard issues introduced by making it dual-stack
-rw-r--r--playbooks.d/vpn-wireguard/playbook.bash3
-rw-r--r--playbooks.d/vpn-wireguard/share/peer2
2 files changed, 3 insertions, 2 deletions
diff --git a/playbooks.d/vpn-wireguard/playbook.bash b/playbooks.d/vpn-wireguard/playbook.bash
index 82b7286..c78906c 100644
--- a/playbooks.d/vpn-wireguard/playbook.bash
+++ b/playbooks.d/vpn-wireguard/playbook.bash
@@ -31,7 +31,8 @@ playbook_add() {
# Generate the peerfile for this machine
file_template "peer" \
endpoint="$(config "$BASHTARD_PLAYBOOK.endpoint")" \
- ip="$(config "$BASHTARD_PLAYBOOK.ip")" \
+ ipv4="$(config "$BASHTARD_PLAYBOOK.ipv4")" \
+ ipv6="$(config "$BASHTARD_PLAYBOOK.ipv6")" \
port="$(config "$BASHTARD_PLAYBOOK.port" "51820")" \
pubkey="$(wg pubkey < "$data/privkey")" \
> "$data/peers/${BASHTARD_PLATFORM[fqdn]}"
diff --git a/playbooks.d/vpn-wireguard/share/peer b/playbooks.d/vpn-wireguard/share/peer
index c1dde60..5dfc3dd 100644
--- a/playbooks.d/vpn-wireguard/share/peer
+++ b/playbooks.d/vpn-wireguard/share/peer
@@ -1,4 +1,4 @@
[Peer]
-AllowedIPs = ${ip}/128
+AllowedIPs = ${ipv6}/128,${ipv4}/32
Endpoint = [${endpoint}]:${port}
PublicKey = ${pubkey}