From c89f201c781895e6760fd3b3154766dd748ac950 Mon Sep 17 00:00:00 2001 From: Mehrdad Tahernia <2920608+mtahernia@users.noreply.github.com> Date: Mon, 11 Mar 2024 16:03:03 +0100 Subject: [PATCH] fix issue 211: DNS Search Domain not applying (#217) Added the DnsSearchStr to the template to include the dns search domain in the generated config file --- internal/app/configfile/tpl_files/wg_peer.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/app/configfile/tpl_files/wg_peer.tpl b/internal/app/configfile/tpl_files/wg_peer.tpl index 79c9643..8a4bae4 100644 --- a/internal/app/configfile/tpl_files/wg_peer.tpl +++ b/internal/app/configfile/tpl_files/wg_peer.tpl @@ -25,7 +25,7 @@ Address = {{ CidrsToString .Peer.Interface.Addresses }} # Misc. settings (optional) {{- if .Peer.Interface.DnsStr.GetValue}} -DNS = {{ .Peer.Interface.DnsStr.GetValue }} +DNS = {{ .Peer.Interface.DnsStr.GetValue }} {{- if .Peer.Interface.DnsSearchStr.GetValue}}, {{ .Peer.Interface.DnsSearchStr.GetValue }} {{- end}} {{- end}} {{- if ne .Peer.Interface.Mtu.GetValue 0}} MTU = {{ .Peer.Interface.Mtu.GetValue }} @@ -62,4 +62,4 @@ PresharedKey = {{ .Peer.PresharedKey }} {{- end}} {{- if and (ne .Peer.PersistentKeepalive.GetValue 0) (eq .Peer.Interface.Type "client")}} PersistentKeepalive = {{ .Peer.PersistentKeepalive.GetValue }} -{{- end}} \ No newline at end of file +{{- end}}