Aloha,
I am running LXD on three servers on my home network, both using a network bridge on the host to connect containers to my local network, so that they appear on my network as their own. I’m using my ISP-provided router for the moment, planning on replacing it due to it’s poor performance and lack of customization.
1- How could I change how DNS settings are announced to containers? I’d be interested to know what kind of network manager is used on the base Debian cloud-init image, and how the DNS configuration is received by the containers, in order to change it in favor of a local DNS server running on the host. By default, containers are using the home router as their DNS provider ( 192.168.1.1
), which I’d like to change to a local DNS server, preferably all at once.
2- What would be the best way to automatically add DNS records for all instances? I own a few domains that I use to reach my services, but for local networking I’m dependent of my home router’s (poor) mDNS service (especially new containers or IP changes are very slowly detected by the router). It may take up to a few hours for my newly created container to be reachable via it’s hostname on my local network. Instead, I would rather have all my containers be automatically added to a local DNS server, or otherwise broadcasted, so that they are immediately and always accessible via their hostname or a canonical subdomain “URN” of the form <instance>.<host>.net.example.org
or <instance>.<host>.net.example.local
. If a container’s IP were to change, or a new container be created, changes should be applied to the network as fast as possible. As the cherry on the cake, if I could allow a few of those containers to be directly reachable via IPv6 on their URN from the Internet, that would be quite appreciable (albeit doing so would have it’s own security concerns).