mirror of
https://github.com/trailofbits/algo
synced 2024-11-16 12:12:55 +00:00
18 lines
643 B
Django/Jinja
18 lines
643 B
Django/Jinja
[Interface]
|
|
Address = {{ wireguard_server_ip }}
|
|
ListenPort = {{ wireguard_port }}
|
|
PrivateKey = {{ lookup('file', wireguard_config_path + '/private/' + IP_subject_alt_name) }}
|
|
SaveConfig = false
|
|
|
|
{% for u in wireguard_users %}
|
|
{% if u in users %}
|
|
{% set index = loop.index %}
|
|
|
|
[Peer]
|
|
# {{ u }}
|
|
PublicKey = {{ lookup('file', wireguard_config_path + '/public/' + u) }}
|
|
AllowedIPs = {{ wireguard_network_ipv4['clients_range'] }}.{{ wireguard_network_ipv4['clients_start'] + index }}/32{% if ipv6_support %},{{ wireguard_network_ipv6['clients_range'] }}{{ wireguard_network_ipv6['clients_start'] + index }}/128{% endif %}
|
|
|
|
{% endif %}
|
|
{% endfor %}
|