[Bug] Split DNS not working with v0.23.0 #797

Closed
opened 2025-12-29 02:24:09 +01:00 by adam · 1 comment
Owner

Originally created by @maprambo on GitHub (Sep 19, 2024).

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I configured split DNS. No machine can resolve the hostnames. If I manually query the dns server with dig host001.ol02.example.org @100.64.0.21 on one of my clients, it does work though.

For the new version I had to change the structure a bit in my config, but split DNS was working in before versions.

Expected Behavior

The split DNS config from headscale should be used and the tailscale DNS should automatically use the configured DNS server.

Steps To Reproduce

This is an excerpt from my config.yaml:

dns:
  split:
    ol02.example.org:
      - 100.64.0.21

Environment

- (Client) OS: iOS 16.7.10; openSUSE Tumbleweed
- Headscale version: v0.23.0
- Tailscale version: iOS client: 1.74.0; openSUSE client: 1.48.2

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Anything else?

I noticed the code changed - in 41c5a0ddf5/app.go the code was

h.cfg.DNSConfig.Routes = make(map[string][]dnstype.Resolver)

Now https://github.com/juanfont/headscale/blob/main/hscontrol/app.go it is (note the *):

app.cfg.DNSConfig.Routes = make(map[string][]*dnstype.Resolver)

I have to idea if that means something.

Originally created by @maprambo on GitHub (Sep 19, 2024). ### Is this a support request? - [X] This is not a support request ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior I configured split DNS. No machine can resolve the hostnames. If I manually query the dns server with `dig host001.ol02.example.org @100.64.0.21` on one of my clients, it does work though. For the new version I had to change the structure a bit in my config, but split DNS was working in before versions. ### Expected Behavior The split DNS config from headscale should be used and the tailscale DNS should automatically use the configured DNS server. ### Steps To Reproduce This is an excerpt from my config.yaml: ``` dns: split: ol02.example.org: - 100.64.0.21 ``` ### Environment ```markdown - (Client) OS: iOS 16.7.10; openSUSE Tumbleweed - Headscale version: v0.23.0 - Tailscale version: iOS client: 1.74.0; openSUSE client: 1.48.2 ``` ### Runtime environment - [X] Headscale is behind a (reverse) proxy - [X] Headscale runs in a container ### Anything else? I noticed the code changed - in https://github.com/juanfont/headscale/blob/41c5a0ddf56637c582098f220c06bb3180ef8799/app.go the code was ``` h.cfg.DNSConfig.Routes = make(map[string][]dnstype.Resolver) ``` Now https://github.com/juanfont/headscale/blob/main/hscontrol/app.go it is (note the \*): ``` app.cfg.DNSConfig.Routes = make(map[string][]*dnstype.Resolver) ``` I have to idea if that means something.
adam added the bug label 2025-12-29 02:24:09 +01:00
adam closed this issue 2025-12-29 02:24:09 +01:00
Author
Owner

@maprambo commented on GitHub (Sep 19, 2024):

I figured it out. My config was wrong, note the nameservers tag:

dns:
  nameservers:
    split:
      ol02.example.org:
        - 100.64.0.21
@maprambo commented on GitHub (Sep 19, 2024): I figured it out. My config was wrong, note the `nameservers` tag: ``` dns: nameservers: split: ol02.example.org: - 100.64.0.21 ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#797