Hi there. I’ve been trying to setup an environment where my host machine remains exposed to the internet and my containers host services, with the host acting as a proxy for traffic coming in. The issue I’m encountering is that my containers will not connect to the internet. To clarify, I’m not speaking about traffic going into the container from the internet, rather I’m talking about the container connecting to the internet to perform basic functions such as pinging google or updating packages.
Both the container and host environment are on ubuntu 16.04 LTS and the container is able to successfully ping the host and any other containers I happen to create. I have tried various solutions found online using google that involve creating iptables rules for routing traffic to and from the container, to no avail. Otherwise this is a fresh out-of-the-box install.
Oddly enough, in all of my testing environments save for one, this occurs. The one environment where the container is able to reach the internet without any additional configuration past
lxd init is a home hosted setup with a modem/router acting as the network’s DHCP server, which is the only thing I can think of that could influence the container in such a way to provide internet access.
To clarify, the hosts have no issue with connecting to the internet. Only the containers do.
EDIT To clarify again, the hosts are also containers, so that’s nested containers. The 2nd layer of nesting cannot reach the internet, with the exception of that home hosted setup I mentioned earlier.