[vnet] add authoritative DNS mode on Linux#63706
Conversation
…elegate it to systemd-resolved
|
I'm curious about the reasoning for authoritative mode and how we expect it to work For example, say:
On other platforms the result is deterministic - VNet will always assign a VNet address for queries for |
|
@nklaassen
So in your exapmle: A lookup for tcp.example.com goes only to VNet. There’s no race unless another link also claims ~example.com. Could you please tell more about cases where a VNet takes over an FQDN that also has a public DNS record? |
|
So in this case the problem is the request will not be forwarded, we need to forward DNS requests that don't match a known app. Check out the original DNS resolver design here https://github.com/gravitational/teleport/blob/master/rfd/0163-vnet.md#dns-queries-and-ip-address-assignment and the changes we made when adding VNet SSH here https://github.com/gravitational/teleport/blob/master/rfd/0207-vnet-ssh.md#dns-resolution There are some common cases where we do need to forward the DNS query upstream, VNet is not meant to be authoritative over any DNS zones except for its known apps.
We have a VNet usecase where a cluster can make |
|
I assume it's difficult or impossible to get systemd-resolved to resolve queries for |
This PR is a part of #63664. It adds authoritative DNS mode for VNet on Linux, which is required for correct interaction with systemd-resolved.
systemd-resolved can merge DNS zones and will query multiple upstream servers:
Currently VNet works in recursive mode: it lists upstream servers and forwards queries it can’t resolve. I also added authoritative mode: unresolved queries return NXDOMAIN without forwarding, which delegates these queries to systemd-resolved. I tested this with a dummy DNS using the same zone as VNet and it worked.