-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MagicDNS base domain clobbers valid records #160
Comments
Good observation, from what i understand, this is on the tailscale side and we can't really do anything else than warning/recommending people. Would you be able to pr a doc change to inform the users? Let me know if I misunderstood. |
I think this is a valid issue. Need to investigate a bit. I reckon we should only capture $NAMESPACE.$BASE_DOMAIN not the whole base domain. |
I would tend to agree with Juan that the expected behavior would be for headscale/tailscale to only capture $NAMESPACE.$BASE_DOMAIN (along with any additional namespaces visible to the current user), rather than clobbering the entire base domain. I understand that the actual DNS responses are controlled by the tailscale client, which is running the DNS server, however it seems like modification of |
Yep, I am working on a patch that fixes that already. Will probably launch
a PR today.
…On Fri, Oct 15, 2021, 13:48 Nick Anstee ***@***.***> wrote:
I would tend to agree with Juan that the expected behavior would be for
headscale/tailscale to only capture $NAMESPACE.$BASE_DOMAIN (along with any
additional namespaces visible to the current user), rather than clobbering
the entire base domain.
I understand that the actual DNS responses are controlled by the tailscale
client, which is running the DNS server, however it seems like modification
of generateMagicDNSRootDomains within dns.go could resolve the issue if
it were to actually specify the individual relevant subdomains, instead of
the base domain itself like it currently does on dns.go#40
<https://github.com/juanfont/headscale/blob/main/dns.go#L40>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#160 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABMGQ6VJEHPUOHVHAHZ3DTUHAIKDANCNFSM5F6KPQKQ>
.
|
The Domain used for MagicDNS' base domain must not match an actual domain, as any valid records within such domain are completely clobbered by MagicDNS and return NXDOMAIN.
In my own testing I use my domain (anstee.dev) as the base, knowing full well that MagicDNS will include the namespace ("nicka101" for my testing) in the produced records , and thus there should be no conflict with actual records visible to upstream DNS.
However checking DNS responses after making these changes reveals the following:
Relevant section of headscale config:
DNS query for the base domain against 8.8.8.8:
DNS query for base domain against 100.100.100.100:
Note that its not just the base domain that gets clobbered, any valid subdomains are also clobbered:
MagicDNS entries themselves are working as expected however:
The text was updated successfully, but these errors were encountered: