[Bug] restricted_nameserver is configured containing custom DNS records, clients do not resolve correctly #703

Closed
opened 2025-12-29 02:22:39 +01:00 by adam · 2 comments
Owner

Originally created by @trinity-geology-unstable on GitHub (May 7, 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

Running Pop_OS!, entering command nslookup subdomain.home.mydomain.com resolves to the public IP of the root mydomain.com as is configured publicly in cloudflare

Expected Behavior

The command should resolve to the local IP address contained within a nameserver configured in the headscale config file under restricted nameservers

Steps To Reproduce

  1. Configure headscale with a local IP address for a nameserver under restricted_nameservers e.g.

restricted_nameservers:
home.mydomain.com:
- 10.0.20.15

  1. Set override_local_dns: true

  2. Add a custom record to that nameserver e.g. subdomain.home.mydomain.com = 10.0.20.20

  3. Run tailscale on a client and accept DNS + accept routes

  4. Try to resolve the subdomain. Result is the public IP of mydomain.com rather than 10.0.20.20

Environment

- OS: Pop_OS!
- Headscale version: 0.22 (latest alpha is unstable for me)
- Tailscale version: 1.64.0

Runtime environment

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

Anything else?

I cannot post this in Discord because it requires a phone number which I don't have.

Originally created by @trinity-geology-unstable on GitHub (May 7, 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 Running Pop_OS!, entering command `nslookup subdomain.home.mydomain.com` resolves to the public IP of the root mydomain.com as is configured publicly in cloudflare ### Expected Behavior The command should resolve to the local IP address contained within a nameserver configured in the headscale config file under restricted nameservers ### Steps To Reproduce 1. Configure headscale with a local IP address for a nameserver under restricted_nameservers e.g. restricted_nameservers: home.mydomain.com: - 10.0.20.15 2. Set override_local_dns: true 3. Add a custom record to that nameserver e.g. subdomain.home.mydomain.com = 10.0.20.20 3. Run tailscale on a client and accept DNS + accept routes 4. Try to resolve the subdomain. Result is the public IP of mydomain.com rather than 10.0.20.20 ### Environment ```markdown - OS: Pop_OS! - Headscale version: 0.22 (latest alpha is unstable for me) - Tailscale version: 1.64.0 ``` ### Runtime environment - [X] Headscale is behind a (reverse) proxy - [X] Headscale runs in a container ### Anything else? I cannot post this in Discord because it requires a phone number which I don't have.
adam added the bug label 2025-12-29 02:22:39 +01:00
adam closed this issue 2025-12-29 02:22:39 +01:00
Author
Owner

@trinity-geology-unstable commented on GitHub (May 7, 2024):

nameserver set to 100.100.100.100 in /etc/resolv.conf

Changed to 127.0.0.53 fixed it.

@trinity-geology-unstable commented on GitHub (May 7, 2024): nameserver set to 100.100.100.100 in /etc/resolv.conf Changed to 127.0.0.53 fixed it.
Author
Owner

@richard-netltd commented on GitHub (May 7, 2024):

That requires a user change which seems wrong, have you configured magic dns to be on or off?

@richard-netltd commented on GitHub (May 7, 2024): That requires a user change which seems wrong, have you configured magic dns to be on or off?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#703