diff --git a/modules/tailscale/ts-dns-forwarder.nix b/modules/tailscale/ts-dns-forwarder.nix index 1745177..ef65ad5 100644 --- a/modules/tailscale/ts-dns-forwarder.nix +++ b/modules/tailscale/ts-dns-forwarder.nix @@ -19,6 +19,14 @@ # tailnet-specific subdomain (vars.tailnetDomain) instead. services.dnsmasq = { enable = true; + # NixOS's dnsmasq module defaults resolveLocalQueries to true, which adds + # 127.0.0.1 to networking.nameservers and makes dnsmasq bind to + # listen-address=127.0.0.1. This instance is not the host's local + # resolver — it only serves IPA's conditional forwarder for tailnet names. + # The host uses domainControllerIp directly (networking.nameservers in + # host.nix). Without this, all host DNS goes through dnsmasq, which has + # no upstream for general queries (no-resolv=true), breaking resolution. + resolveLocalQueries = false; settings = { # Listen only on the LAN interface — not tailscale0 or loopback. # bind-interfaces prevents dnsmasq from binding to 0.0.0.0 and