Skip to content
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

Align behaviour of dns_config.restricted_nameservers to tailscale #1162

Merged
merged 2 commits into from
Jan 30, 2023

Conversation

dbevacqua
Copy link
Contributor

@dbevacqua dbevacqua commented Jan 23, 2023

Fixes #1161

Tailscale allows split DNS configuration without requiring global nameservers.

In addition, as per the docs:

These nameservers also configure search domains for your devices

In addition, as stated in the FAQ:

Previous versions of the DNS settings page allowed defining search domains separately from nameservers. However, due to cross-platform compatibility reasons, this is no longer possible. To define a search domain, you’ll need to add at least one nameserver along with it.

This commit aligns headscale to tailscale by:

  • removing support for dns_config.domains
  • honouring dns_config.restricted_nameservers regardless of whether any global resolvers are configured
  • adding a search domain for each nameserver in restricted_nameservers

I realise "removing support for dns_config.domains" may be controversial as the tailscale client still supports search domains being defined separately, though it seems likely that this "undocumented" behaviour could (/should) be removed in future. Happy to adjust the change if required.

EDIT: removed "removing support for dns_config.domains" as it is a breaking change.

If the changes look good, I'll update changelog etc.

  • read the CONTRIBUTING guidelines
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

@dbevacqua dbevacqua changed the title Align behaviour of dns_config.restricted_nameservers and dns_config.domains to tailscale Align behaviour of dns_config.restricted_nameservers to tailscale Jan 24, 2023
@juanfont
Copy link
Owner

@dbevacqua looking good. Can you add a changelog entry?

@dbevacqua
Copy link
Contributor Author

@dbevacqua looking good. Can you add a changelog entry?

Done

Align behaviour of dns_config.restricted_nameservers to tailscale.

Tailscale allows split DNS configuration without requiring global nameservers.

In addition, as per [the docs](https://tailscale.com/kb/1054/dns/#using-dns-settings-in-the-admin-console):

> These nameservers also configure search domains for your devices

This commit aligns headscale to tailscale by:

 * honouring dns_config.restricted_nameservers regardless of whether any global resolvers are configured
 * adding a search domain for each restricted_nameserver
Copy link
Owner

@juanfont juanfont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split DNS behaviour differs from tailscale's
2 participants