Homelab/ansible/playbooks/templates/wg0.conf.j2

13 lines
526 B
Django/Jinja

[Interface]
Address = 10.0.0.2/24
PrivateKey = {{ vault_wg_gateway_private_key }}
ListenPort = 51820
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
# VPS Scaleway
PublicKey = {{ vault_wg_vps_public_key }}
Endpoint = 51.158.126.113:51820
AllowedIPs = 10.0.0.0/24
PersistentKeepalive = 25