Skip to content

Add tailscale dns.OSConfigurator that uses CoderVPN protocol #14733

Description

@spikecurtis

In order to support an IPv6 desktop native VPN on macOS, we need to be able to configure DNS settings to direct domain queries with the suffix .coder to the DNS server embedded in tailnet (#14718). We want to do this using the native NetworkExtension APIs. Tailscale's wgengine uses a dns.OSConfigurator to set DNS configuration. We need to build a new implementation of this interface that uses the CoderVPN protocol (#14731) to send NetworkSettings to the manager, which then calls the native APIs.

Image

Activity

  1. ethanndickson commented on Oct 30, 2024

    @ethanndickson
    Member

    This seems pretty straight-forward, few things:

    • SupportsSplitDNS: Taking a look at Tailscale's DNS manager for Windows & macOS, this is always true on macOS, and true on Windows after 10. I don't think it's worth communicating whether or not it's true from the client, so I think we can just hardcode true, with the assumption that they're running a CoderVPN compatible operating system.

    • GetBaseConfig: this is only used to blend the set config with the OS config if there's no split DNS, so we can just have this return dns.ErrGetBaseConfigNotSupported

    • Close: I don't believe we need to start any cleanup from within the dyllib, so this is just a no-op.

    • NetworkSettingsRequest_DNSSettings.DNSSettings.DomainName: We can just hardcode this to coder for .coder, I presume?

    • NetworkSettingsRequest_DNSSettings.MatchDomainsNoSearch: How should this get populated? Is this going to differ per client? My first thought is that this would be always true.

  2. spikecurtis commented on Nov 1, 2024

    @spikecurtis
    CollaboratorAuthor

    SupportsSplitDNS: Taking a look at Tailscale's DNS manager for Windows & macOS, this is always true on macOS, and true on Windows after 10. I don't think it's worth communicating whether or not it's true from the client, so I think we can just hardcode true, with the assumption that they're running a CoderVPN compatible operating system.

    👍

    GetBaseConfig: this is only used to blend the set config with the OS config if there's no split DNS, so we can just have this return dns.ErrGetBaseConfigNotSupported

    👍

    Close: I don't believe we need to start any cleanup from within the dyllib, so this is just a no-op.

    👍

    NetworkSettingsRequest_DNSSettings.DNSSettings.DomainName: We can just hardcode this to coder for .coder, I presume?

    👍

    NetworkSettingsRequest_DNSSettings.MatchDomainsNoSearch: How should this get populated? Is this going to differ per client? My first thought is that this would be always true.

    Yeah, I think we should not make .coder part of the search list. (That is, NoSearch=true.) It might be cool to be able to just type your workspace name, rather than workspace.coder, but the security story for that is a bit sketchy, since you're rolling the dice a bit in what you connect to. E.g. you're in a coffee shop with open WiFi and someone uses mDNS to direct you to workspace.local without you noticing. It's also a nice little brand placement for Coder.

  3. added a commit that references this issue on Nov 5, 2024
    871cc05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

networking

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions