-
Notifications
You must be signed in to change notification settings - Fork 4
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
chore: use coder DNS service address #64
Conversation
net/dns/manager_test.go
Outdated
rs: resolver.Config{ | ||
Routes: upstreams( | ||
".", "", | ||
"coder.", "fd60:627a:a42b::53", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't totally understand the purpose of routes on resolver.Config
. This just points to itself and it just works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's for allowing the DNS service to query external DNS servers. We don't need it for our purposes since the local DNS will be authoritative for all **.coder.
names, and we'll use split-DNS so that the OS only asks us for these names in the first place.
For OSes which don't support split DNS, Tailscale becomes the default resolver, and then gets configured with upstream DNS servers for queries it can't handle locally. We don't need to do this so we won't ever have upstream routes.
6c21cc6
to
26868cc
Compare
I realised I can test this locally, gonna do that before merging |
From my testing on Windows it seems to do the trick:
|
These were somehow missed when I wrote the router.. Also updates `coder/tailscale` to bring in the DNS changes coder/tailscale#64
These were somehow missed when I wrote the router.. Also updates `coder/tailscale` to bring in the DNS changes coder/tailscale#64
Relates to coder/coder#14718
This enables the Tailscale built-in DNS nameserver (
Resolver
) to listen on the pre-determined Coder DNS address,[fd60:627a:a42b::53]:53
.Note that there's currently a hardcoded check in the DNS manager that ignores the hosts on
dns.Config
unlessgoos= "windows"
. This means the platform specific part of CoderVPN won't get the specific host mappings, only the address of the Tailscale nameserver. If we need to modify the hosts file on Windows, we'll need to change that (answer pending dean's return) .For example, this
in: dns.Config
produces the following OS config, and Resolver config: