From aad339d85519e37edb0dd240241f42453f3a60f2 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Wed, 9 Aug 2023 14:49:11 +0300 Subject: [PATCH] add dns configuration --- templates/wireguard_client.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/wireguard_client.conf b/templates/wireguard_client.conf index eaa3784..00aa819 100644 --- a/templates/wireguard_client.conf +++ b/templates/wireguard_client.conf @@ -1,8 +1,8 @@ [Interface] -Address = {% for item in wireguard_peers %}{% if item['name'] == inventory_hostname %}{{ item['AllowedIPs'] }} -{% endif %}{% endfor %} +Address = {% for item in wireguard_peers %}{% if item['name'] == inventory_hostname %}{{ item['AllowedIPs'] }}{% endif %}{% endfor %} PrivateKey = {{ private_key }} ListenPort = {{ listenport }} +DNS = {% if vpn_dns is defined %}{{ vpn_dns }}{% else %}{{ server_address }}{% endif %} {% for item in wireguard_peers %}{% if item['name'] != inventory_hostname and 'PublicKey' in item and 'AllowedIPs' in item %}