Skip to content

Add support for host aliases when using MagicDNS? #762

Closed
@VolatileDream

Description

Feature request

Expose a way to map multiple hostnames to an existing device, assuming they all belong to the same namespace. I'm only asking for the ability to map hostnames that would be inside the tailnet, to other names that are inside the tailnet.

This is effectively DNS CNAME records, but I would like to configure them in Headscale. I would consider it more usable if I didn't have to rely on another DNS resolver providing the CNAME resolution for things inside my tailnet.

For example:

webhost-1.machines.<tailnet> -> server.machines.<tailnet>
webhost-2.machines.<tailnet> -> server.machines.<tailnet>
webhost-3.machines.<tailnet> -> server.machines.<tailnet>

But I would not want to support:

google.com.             -> server.machines.<tailnet>
test.machines.<tailnet> -> duckduckgo.com.

I'm not asking cross namespace support (eg: some.machine.<tailnet> -> other.namespace.<tailnet>) but I can see uses for it, so others may chime in to request it.


Tailscale is building support for tailcfg.DNSConfig.ExtraRecords: a way to pass around extra DNS records for use with MagicDNS. It appears that it currently supports A and AAAA records, but based on filed issues, it may grow to support CNAME (in some limited capacity).

I would like to request that once possible CNAME records are added to the Headscale configuration. But perhaps in the meantime, this could be implemented via A and AAAA records?


I currently have a system with multiple web services configured using a reverse proxy to route traffic. I'd like to expose it as a single tailscale node, rather than splitting each service out and creating more tailscale nodes, and mapping multiple hostnames keeps the reverse proxy functioning.


Collection of related Tailscale issues:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions