25 lines
674 B
Django/Jinja
25 lines
674 B
Django/Jinja
{{ ansible_managed | comment }}
|
|
# Relay tunnel. This box forwards nothing; see the sysctl and nftables
|
|
# tasks in wg-relay.yml.
|
|
|
|
[Interface]
|
|
Address = {{ wg_address }}
|
|
ListenPort = {{ wg_listen_port }}
|
|
MTU = {{ wg_mtu }}
|
|
PrivateKey = {{ wg_relay_effective_private_key }}
|
|
|
|
{% for peer in wg_peers %}
|
|
# {{ peer.name }}
|
|
[Peer]
|
|
PublicKey = {{ peer.public_key }}
|
|
AllowedIPs = {{ peer.allowed_ips }}
|
|
{% if peer.endpoint is defined and peer.endpoint %}
|
|
Endpoint = {{ peer.endpoint }}
|
|
{% endif %}
|
|
{% if peer.preshared_key is defined and peer.preshared_key %}
|
|
PresharedKey = {{ peer.preshared_key }}
|
|
{% endif %}
|
|
PersistentKeepalive = {{ peer.keepalive | default(25) }}
|
|
|
|
{% endfor %}
|