Parametrize wg.conf template
This commit is contained in:
parent
f5af9eeb59
commit
d704202e6e
3 changed files with 10 additions and 7 deletions
|
@ -3,17 +3,17 @@
|
|||
# PublicKey = {{ pubkey }}
|
||||
PrivateKey = # paste private key here
|
||||
Address = {{ ip }}
|
||||
{% if use_dns %}DNS = 212.235.188.28,212.235.188.29,fri1.uni-lj.si{% endif %}
|
||||
{%- if dns %}
|
||||
DNS = {{ dns }}
|
||||
{%- endif %}
|
||||
|
||||
[Peer]
|
||||
Endpoint = {{ server }}:{{ port }}
|
||||
PublicKey = {{ server_key }}
|
||||
PersistentKeepalive = 25
|
||||
AllowedIPs = 10.32.0.0/14
|
||||
AllowedIPs = 212.235.188.16/28
|
||||
AllowedIPs = 212.235.188.32/27
|
||||
AllowedIPs = 212.235.188.64/26
|
||||
{%- for net in allowed_nets.split() %}
|
||||
AllowedIPs = {{ net }}
|
||||
{%- endfor %}
|
||||
{% if add_default -%}
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
{%- endif %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue