I’ve done some quick digging on how DNS works… as well as how it works specifically with LXD and Tailscale. For back story I have a LXD host with Tailscale installed… it holds an account with a gitlab-runner on it (sans sudo access) that can control LXD via Juju. The LXD networking is the basic default bridge style… so it’s DHCP setup is assigning CIDR 10.10.10.0/24 for example).
For background on what tailscale is :
www.tailscale.com
My question posed to the Tailscale networking community
https://forum.tailscale.com/t/how-to-properly-setup-dns-of-devices-on-a-tailscale-subnet/4567
But from LXD’s perspective I saw some postings about an LXC/LXD DNS… I am thinking to somehow lean instead into Tailscales magic DNS with subnets… but it is unclear to me if that’s even possible… do I need to run my own BIND on the host instead?? or what is the proper LXD way to setup DNS on those lxbr0 containers so that… if I wanted to … add my nameserver to tailscales list of valid nameservers… I am just guessing here.
About the Host :
x64 hardware - bare metal install, connected to a mikrotik router
Tailscale tailnet installed on the LXD host with SSH and subnet routing enabled (routes 10.10.10.0/24)
Kubuntu 22.04 LTS
lxc --version == 5.10
juju --version == 2.8.38xxx
So I want to be able to join the tailscale tailnet with client A , client B … and all of them should be able to hit
GET lxd.customdomain.com
and it will hit some LXD container inside the host on say 10.10.10.100
I can already ping these containers successfully but now looking how best to setup DNS.
References I am looking over :
BIND - how to - https://askubuntu.com/questions/602505/configure-dns-for-subnet
mDNS - seems related but… more for LXD clustering… where as I am a single host Introducing MicroCloud
LXD has DNS I can setup ? Cannot resolve non-LXD domains within containers after setting up .lxd DNS resolution
The readthedocs seemed 404’d or under maintenance https://lxd.readthedocs.io/en/latest/
Perhaps this is the right doc to get started if I want to setup LXD’s own DNS? and then forward that nameserver to tailscale ? https://linuxcontainers.org/lxd/docs/master/howto/network_zones/