How do I configure lxdbr0 to forward DNS requests to external DNS servers

I’ve got LXD (v5.21.2 LTS) installed on Amazon Linux 2023 on a ec2 node this all works however my LXD instances don’t use the hosts DNS server they use the .lxd domain.

How do I configure my lxdbr0 so that it also forwards to the amazon DNS servers?

Hi there,

Please can you advise why you want to use the host’s DNS servers?

As although LXD’s managed lxdbr0 bridge network does provide an internal DNS server for resolving the .lxd domain, it also forwards external DNS requests to your host’s DNS servers.

So I am unsure what the issue is that you’re encountering.

Thanks

All I want todo is to add a custom search domain to the existing DNS configuration but it appears to be hard wired into ifcfg.eth0.

Otherwise I’d tweak it using cloud-init

Try setting https://documentation.ubuntu.com/lxd/en/latest/reference/network_bridge/#network-bridge-network-conf:dns.search

E.g.

lxc network set lxdbr0 dns.search="foo.localdomain"

Yes tried that but changing that has no effect on the resulting /etc/resolv.conf in the centos9 instance.

Which is why I modify the instances /etc/sysconfg/network-scripts/ifcfg-eth0 directly…