So I followed this guide (big fan of Simos btw!): How to get LXD containers get IP from the LAN with routed network – Mi blog lah!
It worked great on an Ubuntu 20.04 stock host. Like it just worked like magic. Managed to install and update a few things in the container, all great. However, I had to go out for a few errands so I just left the machine running like that.
When I came back and I wanted to install a few more packages - it could not download them. No more internet. Tried pinging a host, an IP, nothing.
I have no idea what happened, what went wrong. I don’t remember changing anything on the host or the container besides issuing a reboot at some point.
Could the reboot mess it up? How could I make this more “resistant” then?
- Host is a Hetzner Cloud VPS.
- The additional routed IP is a floating IP.
- Host and guest is Ubuntu 20.04.
- The host is running Docker, so there are a few network interfaces, but nothing is using this additional IP.
- This additional IP is NOT present on the host (in /etc/netplan config); I only added it to the routed config as instructed. And that worked…
Let me know if you guys need more info or something!
Update 1: It seems like everything works until I install Docker. As soon as Docker is installed and I do a reboot, the container internet breaks and I cannot bring it back up. But what can cause this? I didn’t even start a Docker container, just installed the base Docker and that already breaks things.
Did this one:
curl -sSL https://get.docker.com/ | CHANNEL=stable sh
Once it’s done, things break. I’ll investigate further…