network/salt/wireguard/wireguard.conf

15 lines
463 B
Plaintext
Raw Normal View History

2018-05-17 15:28:36 +02:00
[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
2018-05-17 15:28:36 +02:00
{%- for peer in peers %}
[Peer]
PublicKey = {{ peer['public_key'] }}
AllowedIPs = 0.0.0.0/0,::0/0
Endpoint = {{ peer['endpoint'] }}
{%- endfor %}