aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/roles/wireguard/templates/wg0.conf
blob: 9e6f4c6c486681e2dd8bca481b68c6b571852469 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                      
[Interface]
PrivateKey = {{ wg_private_key }}
Address = {{ wg_addr4 }}, {{ wg_addr6 }}
ListenPort = {{ wg_listen_port }}
{% 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.addr4 }}/32, {{ peer.addr6 }}/128
{% endfor %}
{% endif %}