Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] dns_config.domains only works if override_local_dns is enabled #1963

Closed
3 of 4 tasks
ajs124 opened this issue May 31, 2024 · 3 comments · Fixed by #1987
Closed
3 of 4 tasks

[Bug] dns_config.domains only works if override_local_dns is enabled #1963

ajs124 opened this issue May 31, 2024 · 3 comments · Fixed by #1987
Labels
bug Something isn't working
Milestone

Comments

@ajs124
Copy link

ajs124 commented May 31, 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

Setting dns_config.domains without setting dns_config.override_local_dns = true leads to this warning and dns_config.domains being not applied:
Warning: dns_config.domains is set, but no nameservers are configured. Ignoring domains. (https://github.com/juanfont/headscale/blob/main/hscontrol/types/config.go#L545)

This warning is quite misleading, because nameservers actually refers to resolvers, which is taken from the nameservers field, but only if override_local_dns = true (https://github.com/juanfont/headscale/blob/main/hscontrol/types/config.go#L503).

Expected Behavior

If there are technical reasons, keep this behavior and emit a less misleading error message.

If there aren't any technical reasons for why domains needs override_local_dns, change the check and apply this config.

Steps To Reproduce

Set domains to a non-empty list while setting override_local_dns to false.

Environment

- OS: NixOS 24.05
- Headscale version: master, e.g. 5f9c26930ce796284a8fc7ad167f76e187813d64
- Tailscale version: 1.66.4

Runtime environment

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

Anything else?

I'm open to implementing either option (better error message or changing the check) and opening a PR, if you want me to.

@ajs124 ajs124 added the bug Something isn't working label May 31, 2024
@kradalby kradalby added this to the v0.23.0 milestone Jun 3, 2024
@kradalby
Copy link
Collaborator

I think this is a longstanding bug, I dont think the error makes sense based on Tailscales docs, can you give #1987 a go?

@ajs124
Copy link
Author

ajs124 commented Jun 21, 2024

Thanks! I will give that PR a go, but it might take some days/weeks.

@ajs124
Copy link
Author

ajs124 commented Jun 22, 2024

I gave it a try and it seems to solve my problem. Didn't do any extensive tests though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants