Linux: lxc guest does not get an DHCP address using bridge

Title could also be; lxc networking does not work, using a bridge.

I use a bridge for all my lxc guests (also for docker). This is so that I do not need to setup iptables forwarding to my guests (easy).

But setting up a new Ubuntu 20.04 LTE host gave me some headacke. I could not get my gust to get an ipaddress, and using tcpdump I could see that it did not get an dhcp reply - and looking in the dhcpserver log I could see that nohing arrived there either.

Lots of digging aournd for a good two hours (compaing to another Ubuntu 20.04 LTE), and finally I found the differnce.

On the box where it was workning I had /etc/sysctl.d/99-sysctl-bridge.conf containg:

Adding the same file to my problem box, and issuing "sysctl -p /etc/sysctl.d/99-sysctl-bridge.conf", then restaring my lxc guest, and it got an ip address.
What it does is that it disables the firewall on the bridge ... go figure.
Now the major problem is; where did that file come from in the first place?

I'll probably never know ... but without this, lxc will not work via a bridge.


Popular posts from this blog

Kviknet and IPv6

Apple AirPort Express and Digital Jitter..

MacOS: Disable start of xterm when starting XQuartz