rename clients list to wireguard peers

This commit is contained in:
Antonio J. Delgado 2022-11-04 18:00:54 +02:00
parent e354346bd3
commit 46ba786edb

View file

@ -4,10 +4,12 @@ PrivateKey = {{ privatekey }}
ListenPort = {{ listenport }} ListenPort = {{ listenport }}
PostUp = iptables -t nat -A POSTROUTING -o {{ public_interface }} -j MASQUERADE; ip6tables -t nat -A POSTROUTING -o {{ public_interface }} -j MASQUERADE PostUp = iptables -t nat -A POSTROUTING -o {{ public_interface }} -j MASQUERADE; ip6tables -t nat -A POSTROUTING -o {{ public_interface }} -j MASQUERADE
PostDown = iptables -t nat -D POSTROUTING -o {{ public_interface }} -j MASQUERADE; ip6tables -t nat -D POSTROUTING -o {{ public_interface }} -j MASQUERADE PostDown = iptables -t nat -D POSTROUTING -o {{ public_interface }} -j MASQUERADE; ip6tables -t nat -D POSTROUTING -o {{ public_interface }} -j MASQUERADE
{% for item in clients %} {% for item in wireguard_peers %}
# Client: {{ item.name }} # Peer name: {{ item.name }}
[Peer] [Peer]
PublicKey = {{ item.PublicKey }} PublicKey = {{ item.PublicKey }}
AllowedIPs = {{ item.AllowedIPs }} AllowedIPs = {{ item.AllowedIPs }}
{% endfor %} {% if item.EndPointIP is defined and item.EndPointIP != '' %}
EndPoint = {{ item.EndPointIP }}:{{ listenport }}
{% endfor %}