network/salt/wireguard/wireguard.conf

15 lines
463 B
Plaintext

[Interface]
PrivateKey = {{ private_key }}
Address = {{ addr }}
#DNS = 193.138.219.228
PostUp = iptables -t nat -A POSTROUTING -o %i -j MASQUERADE; ip6tables -t nat -A POSTROUTING -o %i -j MASQUERADE
PostDown = iptables -t nat -D POSTROUTING -o %i -j MASQUERADE; ip6tables -t nat -D POSTROUTING -o %i -j MASQUERADE
{%- for peer in peers %}
[Peer]
PublicKey = {{ peer['public_key'] }}
AllowedIPs = 0.0.0.0/0,::0/0
Endpoint = {{ peer['endpoint'] }}
{%- endfor %}