LXC container networking not working

On a Debian server, I installed lxc, but when I create a container, it is missing IP address. When I did “lxc-attack VM_NAME”, and checked the network interface with “ip link” command, i can only see the loopback interface “lo”.

On Host machine, when I checked network interfaces, lxcbr0 was missing. To fix this, edit file


Replace with

Now restart lxc-net service

At this point, you will see the network interface “lxcbr0”.

Next edit file

I had the following content in this file

root@b24:/etc/lxc# cat default.conf
lxc.net.0.type = empty
lxc.apparmor.profile = generated
lxc.apparmor.allow_nesting = 1


Replace with

After this is done, newly created LXC containers get IP addresses.


Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *