When you use HAProxy in a LXD setup, you can either put HAProxy on the host, or in a container. Tell us which type did you choose?
You would normally setup the containers to use managed networking (lxdbr0 default private bridge). Tell us if you used such a networking setup or you used something else.
There is a hardcore setup where you configure the containers not to have any networking. But I do not think you have used that.
I’ve actually followed some of your guides in the process.
I always find your blog posts and Articles around the web insigtfull.
I’ve setup
host (forward all traffic on port 80 and 443 to haproxy container)
haproxy (container)
webserver (container)
I used the following command to forward traffic with iptables
sudo iptables -t nat -I PREROUTING -i INTERFACE_NAME -p TCP -d
PUBLIC_IP_ADDRESS/32 –dport 80 -j DNAT –to-destination HAPROXY_IP_ADRESS:80
Other than that I have ZFS configured as the filesystem. The LXD network routing config is standard as installed. So I’ve not changed anything here after install.
With such a setup, the individual containers should still be able to get access to the Internet.
That is, the haproxy setup and the iptables rules should not affect in any way the networking of the individual containers.
The only thing I can think of, is if you setup ufw on the host and somehow it blocks DNS for the containers.
Run the following to see the full list of iptables rules on the host.
sudo iptables -L
sudo iptables -t nat -L
Also, check that the containers that cannot resolve, do have an IP address. Because if you do not have IP addresses either, then they did not get their DHCP configuration from LXD at all.