aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/wireguard/templates/wg0.conf
blob: 6e479a60b3a0308f9b6ed756a74f5381a5787044 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[Interface]
PrivateKey = {{ wg_private_key }}
Address = {{ wg_addr4 }}, {{ wg_addr6 }}
ListenPort = {{ wg_listen_port }}
SaveConfig = false
{% if wg_peers is defined %}
{% for peer in wg_peers %}

[Peer]
PublicKey = {{ peer.public_key }}
{% if peer.preshared_key is defined %}
PresharedKey = {{ peer.preshared_key }}
{% endif %}
AllowedIPs = {{ peer.allowed_ips }}
{% if peer.endpoint is defined %}
Endpoint = {{ peer.endpoint }}
{% endif %}
{% if peer.persistent_keepalive is defined %}
PersistentKeepalive = 25
{% endif %}
{% endfor %}
{% endif %}