mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-11 17:27:34 +00:00
Restore support for "Override local DNS" (#2438)
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
This commit is contained in:
@@ -13,3 +13,4 @@ server_url: "https://server.derp.no"
|
||||
dns:
|
||||
magic_dns: true
|
||||
base_domain: derp.no
|
||||
override_local_dns: false
|
||||
|
@@ -13,3 +13,4 @@ server_url: "https://derp.no"
|
||||
dns:
|
||||
magic_dns: true
|
||||
base_domain: clients.derp.no
|
||||
override_local_dns: false
|
||||
|
16
hscontrol/types/testdata/dns-override-true-error.yaml
vendored
Normal file
16
hscontrol/types/testdata/dns-override-true-error.yaml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
noise:
|
||||
private_key_path: "private_key.pem"
|
||||
|
||||
prefixes:
|
||||
v6: fd7a:115c:a1e0::/48
|
||||
v4: 100.64.0.0/10
|
||||
|
||||
database:
|
||||
type: sqlite3
|
||||
|
||||
server_url: "https://server.derp.no"
|
||||
|
||||
dns:
|
||||
magic_dns: true
|
||||
base_domain: derp.no
|
||||
override_local_dns: true
|
20
hscontrol/types/testdata/dns-override-true.yaml
vendored
Normal file
20
hscontrol/types/testdata/dns-override-true.yaml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
noise:
|
||||
private_key_path: "private_key.pem"
|
||||
|
||||
prefixes:
|
||||
v6: fd7a:115c:a1e0::/48
|
||||
v4: 100.64.0.0/10
|
||||
|
||||
database:
|
||||
type: sqlite3
|
||||
|
||||
server_url: "https://server.derp.no"
|
||||
|
||||
dns:
|
||||
magic_dns: true
|
||||
base_domain: derp2.no
|
||||
override_local_dns: true
|
||||
nameservers:
|
||||
global:
|
||||
- 1.1.1.1
|
||||
- 1.0.0.1
|
1
hscontrol/types/testdata/dns_full.yaml
vendored
1
hscontrol/types/testdata/dns_full.yaml
vendored
@@ -7,6 +7,7 @@ dns:
|
||||
magic_dns: true
|
||||
base_domain: example.com
|
||||
|
||||
override_local_dns: false
|
||||
nameservers:
|
||||
global:
|
||||
- 1.1.1.1
|
||||
|
@@ -7,6 +7,7 @@ dns:
|
||||
magic_dns: false
|
||||
base_domain: example.com
|
||||
|
||||
override_local_dns: false
|
||||
nameservers:
|
||||
global:
|
||||
- 1.1.1.1
|
||||
|
@@ -15,4 +15,6 @@ policy:
|
||||
type: file
|
||||
path: "/etc/policy.hujson"
|
||||
|
||||
dns.magic_dns: false
|
||||
dns:
|
||||
magic_dns: false
|
||||
override_local_dns: false
|
||||
|
Reference in New Issue
Block a user