friwall/web/templates/vpn/wg-fri.conf
Timotej Lazar 3c25cbe88a vpn: add support for custom keys
Custom keys are created by admin and specify networks directly,
bypassing AD permissions. They are intended to join managed devices
into networks where users are not allowed to create keys themselves.

Also comprehend a set directly.
2024-07-31 09:43:32 +02:00

20 lines
444 B
Plaintext

[Interface]
# {{ timestamp }} {{ user }} {{ name }}
# PublicKey = {{ pubkey }}
PrivateKey = # paste private key here
Address = {{ ip }}{% if ip6 %}, {{ ip6 }}{% endif %}
{%- if dns %}
DNS = {{ dns }}
{%- endif %}
[Peer]
Endpoint = {{ server }}:{{ port }}
PublicKey = {{ server_key }}
PersistentKeepalive = 25
{%- for net in allowed_nets.split() %}
AllowedIPs = {{ net }}
{%- endfor %}
{% if add_default -%}
AllowedIPs = 0.0.0.0/0
{%- endif %}