From 17f10052bdbc4cf5bfd0e2fa335f13c0165284a5 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Mon, 1 Sep 2025 22:24:41 +0200 Subject: Fix networking issues when VPN isn't active --- roles/network/templates/resolved.conf.j2 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'roles/network/templates/resolved.conf.j2') diff --git a/roles/network/templates/resolved.conf.j2 b/roles/network/templates/resolved.conf.j2 index cccffff1..5d70fb96 100644 --- a/roles/network/templates/resolved.conf.j2 +++ b/roles/network/templates/resolved.conf.j2 @@ -1,10 +1,18 @@ [Resolve] +{% if not (network_ipv4_dns is defined or network_ipv6_dns is defined) %} +# Only set global DNS (and DoT) if not using Pi-hole # cloudflare-dns.com DNS=1.1.1.1 2606:4700:4700::1111 # dns.google FallbackDNS=8.8.8.8 2001:4860:4860::8888 -DNSSEC=yes DNSOverTLS=yes +DNSSEC=yes +{% else %} +# NetworkManager will provide DNS via Pi-hole, no global DNS needed +# Pi-hole doesn't support DoT/DNSSEC +DNSOverTLS=no +DNSSEC=no +{% endif %} # use interface-specific DNS when available but fall back to global (required for VPN DNS to work) Domains=~. -- cgit v1.2.3