infrastructure/ansible/roles/glinet_vpn/files/server.conf
Jake Howard 670ad78d44
All checks were successful
/ terraform (push) Successful in 44s
/ ansible (push) Successful in 1m34s
Add wireguard config for glinet router
2024-04-23 22:19:57 +01:00

14 lines
723 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
PostUp = ip6tables -A FORWARD -i %i -j ACCEPT; ip6tables -A FORWARD -o %i -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = ip6tables -D FORWARD -i %i -j ACCEPT; ip6tables -D FORWARD -o %i -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
PublicKey = {{ client_public_key }}
AllowedIPs = {{ client_cidr }}