[PR #2438] [MERGED] Restore support for "Override local DNS" #2667

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2438
Author: @nblock
Created: 2/20/2025
Status: Merged
Merged: 4/17/2025
Merged by: @kradalby

Base: mainHead: local_dns


📝 Commits (1)

  • 3cd301e Restore support for "Override local DNS"

📊 Changes

12 files changed (+113 additions, -12 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 config-example.yaml (+4 -0)
📝 hscontrol/types/config.go (+15 -2)
📝 hscontrol/types/config_test.go (+48 -9)
📝 hscontrol/types/testdata/base-domain-in-server-url.yaml (+1 -0)
📝 hscontrol/types/testdata/base-domain-not-in-server-url.yaml (+1 -0)
hscontrol/types/testdata/dns-override-true-error.yaml (+16 -0)
hscontrol/types/testdata/dns-override-true.yaml (+20 -0)
📝 hscontrol/types/testdata/dns_full.yaml (+1 -0)
📝 hscontrol/types/testdata/dns_full_no_magic.yaml (+1 -0)
📝 hscontrol/types/testdata/policy-path-is-loaded.yaml (+3 -1)
📝 integration/hsic/config.go (+1 -0)

📄 Description

Tailscale allows to override the local DNS settings of a node via "Override local DNS" [1]. Restore this flag with the same config setting name dns.override_local_dns but disable it by default to align it with Tailscale's default behaviour.

Tested with Tailscale 1.80.2 and systemd-resolved on Debian 12.

With dns.override_local_dns: false:

Link 12 (tailscale0)
Current Scopes: DNS
     Protocols: -DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
   DNS Servers: 100.100.100.100
    DNS Domain: tn.example.com ~0.e.1.a.c.5.1.1.a.7.d.f.ip6.arpa [snip]

With dns.override_local_dns: true:

Link 12 (tailscale0)
Current Scopes: DNS
     Protocols: +DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
   DNS Servers: 100.100.100.100
    DNS Domain: tn.example.com ~.

[1] https://tailscale.com/kb/1054/dns#override-local-dns

Fixes: #2256

  • have read the CONTRIBUTING.md file
  • 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/2438 **Author:** [@nblock](https://github.com/nblock) **Created:** 2/20/2025 **Status:** ✅ Merged **Merged:** 4/17/2025 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `local_dns` --- ### 📝 Commits (1) - [`3cd301e`](https://github.com/juanfont/headscale/commit/3cd301ed71bae8df60251e9eb3a5e713b069e6d9) Restore support for "Override local DNS" ### 📊 Changes **12 files changed** (+113 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `config-example.yaml` (+4 -0) 📝 `hscontrol/types/config.go` (+15 -2) 📝 `hscontrol/types/config_test.go` (+48 -9) 📝 `hscontrol/types/testdata/base-domain-in-server-url.yaml` (+1 -0) 📝 `hscontrol/types/testdata/base-domain-not-in-server-url.yaml` (+1 -0) ➕ `hscontrol/types/testdata/dns-override-true-error.yaml` (+16 -0) ➕ `hscontrol/types/testdata/dns-override-true.yaml` (+20 -0) 📝 `hscontrol/types/testdata/dns_full.yaml` (+1 -0) 📝 `hscontrol/types/testdata/dns_full_no_magic.yaml` (+1 -0) 📝 `hscontrol/types/testdata/policy-path-is-loaded.yaml` (+3 -1) 📝 `integration/hsic/config.go` (+1 -0) </details> ### 📄 Description Tailscale allows to override the local DNS settings of a node via "Override local DNS" [1]. Restore this flag with the same config setting name `dns.override_local_dns` but disable it by default to align it with Tailscale's default behaviour. Tested with Tailscale 1.80.2 and systemd-resolved on Debian 12. With `dns.override_local_dns: false`: ``` Link 12 (tailscale0) Current Scopes: DNS Protocols: -DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported DNS Servers: 100.100.100.100 DNS Domain: tn.example.com ~0.e.1.a.c.5.1.1.a.7.d.f.ip6.arpa [snip] ``` With `dns.override_local_dns: true`: ``` Link 12 (tailscale0) Current Scopes: DNS Protocols: +DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported DNS Servers: 100.100.100.100 DNS Domain: tn.example.com ~. ``` [1] https://tailscale.com/kb/1054/dns#override-local-dns Fixes: #2256 <!-- Headscale is "Open Source, acknowledged contribution", this means that any contribution will have to be discussed with the Maintainers before being submitted. This model has been chosen to reduce the risk of burnout by limiting the maintenance overhead of reviewing and validating third-party code. Headscale is open to code contributions for bug fixes without discussion. If you find mistakes in the documentation, please submit a fix to the documentation. --> <!-- Please tick if the following things apply. You… --> - [x] have read the [CONTRIBUTING.md](./CONTRIBUTING.md) file - [x] raised a GitHub issue or discussed it on the projects chat beforehand - [x] added unit tests - [ ] added integration tests - [ ] updated documentation if needed - [x] 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:22:16 +01:00
adam closed this issue 2025-12-29 03:22:16 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2667