**Environment:**
* **NetBird Client Version:** v0.81.3 (Windows GUI/CLI、MacOS、Linux (Debian))
* **NetBird Client OS:** Windows 11、MacOS 27.1 Linux Debian13
* **NetBird Management Version:** v0.81.3
* **Routing Peer OS:** Linux (Debian)
**Describe the bug:**
We have encountered a DNS routing issue specifically on clients when using exact Fully Qualified Domain Names (FQDNs) as Match Domains in the Nameserver configuration.
When the Match Domain is set to a parent domain (e.g., `us.corp.planetart.com`), the Windows client successfully routes the DNS queries through the NetBird tunnel to our internal DNS server (`10.5.1.2`).
However, when we change the Match Domain to an exact hostname (e.g., `cpa-ad-core-03.us.corp.planetart.com`), the Windows client fails to apply the DNS policy. The query bypasses NetBird and fails with `DNS_ERROR_RCODE_NAME_ERROR` (NXDOMAIN) because it hits the local physical network DNS.
**Steps to Reproduce:**
1. In the NetBird Dashboard, create a Nameserver group pointing to an internal DNS (e.g., `10.5.1.2`).
2. Set the **Match Domains** to an exact FQDN: `cpa-ad-core-03.us.corp.planetart.com`.
3. Assign this Nameserver group to the Windows peer’s distribution group.
4. On the Windows client, restart the NetBird service to apply the new DNS config.
5. Run the following command in PowerShell:
`Resolve-DnsName cpa-ad-core-03.us.corp.planetart.com`
6. **Result:** The resolution fails (NXDOMAIN).
7. **Workaround:** Go back to the Dashboard, change the Match Domain to the parent domain `us.corp.planetart.com`, restart NetBird on the Windows client, and run the command again. It resolves successfully.
**Expected behavior:**
The Windows client should generate the correct NRPT rule and route DNS queries for the exact FQDN `cpa-ad-core-03.us.corp.planetart.com` to the configured internal nameserver (`10.5.1.2`), just as it does for the parent domain.
**Troubleshooting done:**
* Checked `netbird status -d`: The client receives the correct DNS nameserver config from the management server.
* Checked `Get-DnsClientNrptPolicy -Effective`: When using the exact FQDN, the NRPT rule is either not applied correctly or is being overridden by the physical adapter’s DNS (`10.4.25.254`). When using the parent domain, the NRPT rule is applied correctly.
* Cleared Windows DNS cache and forcefully restarted the DnsCache service (`Stop-Service -Name “Dnscache” -Force`) to rule out cached stale policies.
* Verified that the Linux Routing Peer can successfully resolve the exact FQDN (proving the internal DNS server `10.5.1.2` and routing path are functioning).
Output of `netbird status -d` on the Windows client:
Nameservers:
[10.5.1.2:53] for [.] is Available
[223.5.5.5:53] for [n.planetart.club] is Available