[PR #1162] [MERGED] Align behaviour of dns_config.restricted_nameservers to tailscale #1925

Closed
opened 2025-12-29 03:18:54 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/1162
Author: @dbevacqua
Created: 1/23/2023
Status: Merged
Merged: 1/31/2023
Merged by: @juanfont

Base: mainHead: main


📝 Commits (2)

  • 8c2c5e4 Allow split DNS configuration without requiring global nameservers
  • 522f07c Update changelog

📊 Changes

2 files changed (+23 additions, -24 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 config.go (+22 -24)

📄 Description

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/1162 **Author:** [@dbevacqua](https://github.com/dbevacqua) **Created:** 1/23/2023 **Status:** ✅ Merged **Merged:** 1/31/2023 **Merged by:** [@juanfont](https://github.com/juanfont) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`8c2c5e4`](https://github.com/juanfont/headscale/commit/8c2c5e416d281e3a417f676af8417cf09065d9af) Allow split DNS configuration without requiring global nameservers - [`522f07c`](https://github.com/juanfont/headscale/commit/522f07ce5d4bde8952d89419faf0cc6d0a1ca394) Update changelog ### 📊 Changes **2 files changed** (+23 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `config.go` (+22 -24) </details> ### 📄 Description Fixes #1161 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 ~In addition, as stated in [the FAQ](https://tailscale.com/kb/1054/dns/#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. <!-- Please tick if the following things apply. You… --> - [x] read the [CONTRIBUTING guidelines](README.md#contributing) - [x] raised a GitHub issue or discussed it on the projects chat beforehand - [ ] added unit tests - [ ] added integration tests - [x] updated documentation if needed - [ ] updated CHANGELOG.md <!-- If applicable, please reference the issue using `Fixes #XXX` and add tests to cover your new code. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 03:18:54 +01:00
adam closed this issue 2025-12-29 03:18:54 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1925