in which I’m running an LXD server. I want to integrate with systemd-resolved but for some reason the DNS queries do not work
ubuntu@u1:~$ lxc network set lxdbr0 dns.domain '~localenv.com'
ubuntu@u1:~$ lxc network get lxdbr0 dns.domain
~localenv.com
ubuntu@u1:~$ lxc network get lxdbr0 ipv4.address
10.133.185.1/24
ubuntu@u1:~$ sudo resolvectl domain lxdbr0 '~localenv.com'
ubuntu@u1:~$ sudo resolvectl dns lxdbr0 10.133.185.1
ubuntu@u1:~$ sudo resolvectl status lxdbr0
Link 3 (lxdbr0)
Current Scopes: DNS
Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 10.133.185.1
DNS Servers: 10.133.185.1
DNS Domain: ~localenv.com
ubuntu@u1:~$ lxc ls --project prj-nc-env -f compact
NAME STATE IPV4 IPV6 TYPE SNAPSHOTS
nc-test RUNNING 10.133.185.181 (eth0) CONTAINER 0
ubuntu@u1:~$ host nc-test.localenv.com
;; communications error to 127.0.0.53#53: timed out
Host nc-test.localenv.com not found: 5(REFUSED)
The page is about configuring resolved, not about how to configure the network bridge. So we assume that the DNS domain is already configured - adding lxc network set lxdbr0 dns.domain <domain_name> doesn’t belong in here.
I created a PR though to make it clearer that the tilde is needed only when configuring resolved, and that the returned value (and therefore also the value you would configure for dns.domain) does not contain the tilde.