infrastructure/ansible/roles/wireguard_53/files/server.conf

11 lines
442 B
Text

[Interface]
Address = {{ server_ip }}
PrivateKey = {{ server_private_key }}
ListenPort = 53
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
PublicKey = {{ client_public_key }}
AllowedIPs = {{ client_cidr }}