don't add own to peers
This commit is contained in:
parent
95825b9f03
commit
c329f8fd71
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@ 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 wireguard_peers %}
|
{% for item in wireguard_peers %}{% if item['name'] != inventory_hostname and 'PublicKey' in item and 'AllowedIPs' in item %}
|
||||||
|
|
||||||
# Peer name: {{ item.name }}
|
# Peer name: {{ item.name }}
|
||||||
[Peer]
|
[Peer]
|
||||||
|
@ -13,4 +13,4 @@ AllowedIPs = {{ item.AllowedIPs }}
|
||||||
{% if item.EndPointIP is defined and item.EndPointIP != '' %}
|
{% if item.EndPointIP is defined and item.EndPointIP != '' %}
|
||||||
EndPoint = {{ item.EndPointIP }}:{{ listenport }}
|
EndPoint = {{ item.EndPointIP }}:{{ listenport }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endif %}{% endfor %}
|
||||||
|
|
Loading…
Reference in a new issue