debian-setup/templates/network/wireguard/default/mobile.wireguard.j2

14 lines
463 B
Django/Jinja

# {{ ansible_managed }}
[Interface]
Address={{ vpn_peers.mobile.ip }}/{{ vpn_prefix }}
DNS={{ vpn_listen_address }}
PrivateKey={{ lookup("file", vpn_peers.mobile.private_key_source_path) }}
[Peer]
PublicKey={{ lookup("file", vpn_server_public_key_source_path) }}
PresharedKey={{ lookup("file", vpn_peers.mobile.preshared_key_source_path) }}
{% for ip in vpn_peers.mobile.allowed_ips %}
AllowedIPs={{ ip }}
{% endfor %}
Endpoint={{ domain_name }}:{{ vpn_port }}