ansible-roles/vpn/wireguard/templates/server/IFACE.conf

15 lines
397 B
Plaintext
Raw Normal View History

2022-12-20 19:47:11 +01:00
[Interface]
PrivateKey = {{ vpn_wireguard_interface_private_key }}
ListenPort = {{ vpn_wireguard_port }}
{% for client in vpn_wireguard_clients %}
2022-12-20 19:47:11 +01:00
[Peer]
PublicKey = {{ client.public_key }}
PresharedKey = {{ client.preshared_key }}
{% if 'subnet' in client %}
AllowedIPs = {{ vpn_wireguard_subnet }},{{ client.subnet }}
{% else %}
AllowedIPs = {{ vpn_wireguard_subnet }}
{% endif %}
{% endfor %}