So, more LXD, here we go! Today we are going to see how to access our LXD containers from outside of the system running LXD itself.
If you are just trying out stuff (like I am), you probably installed some Ubuntu version on a VM in order to run LXD. This means that by default you have no access to your containers from your system, just from the system running LXD.
A simple solution is to add a route to the isolated network that the container get, going through the host running LXD:
ip route add addr:10.0.3.0/24 via 192.168.99.28
Here we are telling our system that the 10.0.3.0/24 network is routable through 192.168.99.28, our LXD machine.
You probably don’t want to use something like this in production, but we are exporing here! 🙂