IPv4 address not available after upgrade

I upgraded our servers to Ubuntu 22.04.2 LTS and lxd got upgraded to 5.13-cea5ee
But not the containers no longer have their IPv4 addresses. IPv6 does work.

This is how I normally configure the IPv4 address:

lxc config device set kas-nld eth0 ipv4.address 10.10.29.

It’s available in the config:

root@oev3 ~ # lxc config edit kas-nld
devices:
eth0:
ipv4.address: 10.10.29.1
name: eth0
nictype: bridged
parent: lxdbr0
type: nic

But not if I check it with ‘lxc list’:

+---------------+---------+------+-----------------------------------------------+-----------+-----------+
|     NAME      |  STATE  | IPV4 |                     IPV6                      |   TYPE    | SNAPSHOTS |
+---------------+---------+------+-----------------------------------------------+-----------+-----------+
| kas-nld       | RUNNING |      | fd42:f97c:8de2:eca4:216:3eff:feb7:7cf2 (eth0) | CONTAINER | 0         |

The 10.0.0.0 range is configured on the bridge:

70: lxdbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:16:3e:7a:3e:11 brd ff:ff:ff:ff:ff:ff
inet 10.10.0.1/8 scope global lxdbr0
valid_lft forever preferred_lft forever
inet6 fd42:f97c:8de2:eca4::1/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::216:3eff:fe7a:3e11/64 scope link
valid_lft forever preferred_lft forever

Update:

It is working if I configure the IP address in the container (/etc/network/interfaces):

#auto eth0
#iface eth0 inet dhcp

auto eth0
iface eth0 inet static
address 10.10.29.1
netmask 255.0.0.0
gateway 10.0.0.1

But that not what was needed before.

Looks like its the firewall. When I disable ‘ufw’ the IPv4 addresses are one by one added to the containers. So what do I need to specify in the firewall that will allow the IPv4 addresses to be configured/enabled on the containers?

https://linuxcontainers.org/lxd/docs/latest/howto/network_bridge_firewalld/

:slight_smile:

1 Like