AllowedIPs fix

This commit is contained in:
Jack Ivanov 2019-05-14 18:44:38 +02:00
parent 630f1224e2
commit 5f76a29af1

View file

@ -11,6 +11,6 @@ SaveConfig = false
[Peer]
# {{ u }}
PublicKey = {{ lookup('file', wireguard_pki_path + '/public/' + u) }}
AllowedIPs = {{ wireguard_network_ipv4 | ipaddr(index|int+1) }}{{ ',' + wireguard_network_ipv6 | ipaddr(index) if ipv6_support else '' }}
AllowedIPs = {{ wireguard_network_ipv4 | ipaddr(index|int+1) | ipv4('address') }}/32{{ ',' + wireguard_network_ipv6 | ipaddr(index) | ipv6('address') + '/128' if ipv6_support else '' }}
{% endif %}
{% endfor %}