diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-09-01 22:24:41 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-09-01 23:44:24 +0200 |
| commit | 17f10052bdbc4cf5bfd0e2fa335f13c0165284a5 (patch) | |
| tree | d3ca8c539c7f0d0e9a4a115de4e6be1bf24f3f5d /roles/network/templates/resolved.conf.j2 | |
| parent | 38b83b874e91027449e2ffcc2f8ee9e50d4c6554 (diff) | |
Fix networking issues when VPN isn't active
Diffstat (limited to 'roles/network/templates/resolved.conf.j2')
| -rw-r--r-- | roles/network/templates/resolved.conf.j2 | 10 |
1 files changed, 9 insertions, 1 deletions
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=~. |
