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 %}
|
2023-07-22 21:08:50 +02:00
|
|
|
|
2022-12-20 19:47:11 +01:00
|
|
|
[Peer]
|
|
|
|
PublicKey = {{ client.public_key }}
|
|
|
|
PresharedKey = {{ client.preshared_key }}
|
2023-07-28 22:30:55 +02:00
|
|
|
{% if 'inet6_subnet' in client %}
|
|
|
|
AllowedIPs = {{ vpn_wireguard_inet_subnet }}, {{ vpn_wireguard_inet6_subnet }}, {{ client.inet_subnet }}, {{ client.inet6_subnet }}
|
2022-12-20 19:47:11 +01:00
|
|
|
{% else %}
|
2023-07-28 22:30:55 +02:00
|
|
|
AllowedIPs = {{ vpn_wireguard_inet_subnet }}, {{ vpn_wireguard_inet6_subnet }}
|
2022-12-20 19:47:11 +01:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|