IP Access container from host

I am not able to access the container by ssh or. ping from localhost.

Server = nuk
lxc container:
root@nuk:~# lxc list
±---------------±--------±------------------------±------------------------------------------------±----------------±----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
±---------------±--------±------------------------±------------------------------------------------±----------------±----------+
| deconz | RUNNING | 192.168.178.86 (enp5s0) | 2a04:4540:470d:3a00:216:3eff:fecb:7223 (enp5s0) | VIRTUAL-MACHINE | 0 |

ping 192.168.178.86

PING 192.168.178.86 (192.168.178.86) 56(84) bytes of data.

From 192.168.178.96 icmp_seq=1 Destination Host Unreachable
From 192.168.178.96 icmp_seq=2 Destination Host Unreachable
From 192.168.178.96 icmp_seq=3 Destination Host Unreachable
From 192.168.178.96 icmp_seq=4 Destination Host Unreachable
From 192.168.178.96 icmp_seq=5 Destination Host Unreachable
From 192.168.178.96 icmp_seq=6 Destination Host Unreachable

ssh 192.168.178.86
ssh: connect to host 192.168.178.86 port 22: No route to host

Network config:

root@nuk:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp114s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000
link/ether 48:21:0b:5e:5f:48 brd ff:ff:ff:ff:ff:ff
3: wlo1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 04:e8:b9:e1:79:c2 brd ff:ff:ff:ff:ff:ff
altname wlp0s20f3
4: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 8a:36:ff:fa:ea:25 brd ff:ff:ff:ff:ff:ff
inet 192.168.178.96/24 brd 192.168.178.255 scope global dynamic noprefixroute br0
valid_lft 807793sec preferred_lft 807793sec
inet6 2a04:4540:470d:3a00:8836:ffff:fefa:ea25/64 scope global dynamic noprefixroute
valid_lft 6969sec preferred_lft 3369sec
inet6 fe80::8836:ffff:fefa:ea25/64 scope link noprefixroute
valid_lft forever preferred_lft forever
25: mac794a150e@br0: <BROADCAST,MULTICAST,ALLMULTI,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 500
link/ether 00:16:3e:6f:b2:78 brd ff:ff:ff:ff:ff:ff
27: macb63f71b8@br0: <BROADCAST,MULTICAST,ALLMULTI,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 500
link/ether 00:16:3e:cb:72:23 brd ff:ff:ff:ff:ff:ff

iptables:
iptables -L -n -v

Warning: iptables-legacy tables present, use iptables-legacy to see them

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain DOCKER (0 references)
pkts bytes target prot opt in out source destination

Chain DOCKER-ISOLATION-STAGE-1 (0 references)
pkts bytes target prot opt in out source destination
0 0 RETURN all – * * 0.0.0.0/0 0.0.0.0/0

Chain DOCKER-ISOLATION-STAGE-2 (0 references)
pkts bytes target prot opt in out source destination
0 0 RETURN all – * * 0.0.0.0/0 0.0.0.0/0

Are you using macvlan?

no.

lxc config show deconz
architecture: x86_64
config:
image.architecture: amd64
image.description: Ubuntu jammy amd64 (20231122_07:42)
image.os: Ubuntu
image.release: jammy
image.serial: “20231122_07:42”
image.type: disk-kvm.img
image.variant: cloud
limits.cpu: “4”
limits.memory: 16GiB
volatile.base_image: 9159f666635d0665a885e7a08463b1deec12ee66093450db574d15f08032f118
volatile.cloud-init.instance-id: 1fc0edc1-49c3-476b-b525-4d2f58239e09
volatile.eth0.host_name: macaf85bf95
volatile.eth0.hwaddr: 00:16:3e:cb:72:23
volatile.eth0.last_state.created: “false”
volatile.last_state.power: RUNNING
volatile.last_state.ready: “false”
volatile.uuid: 5da209ae-2062-448a-bc38-9ce416a0827b
volatile.uuid.generation: 5da209ae-2062-448a-bc38-9ce416a0827b
volatile.vsock_id: “1340633278”
devices:
root:
path: /
pool: default
size: 64GiB
type: disk
usbstick:
productid: “0030”
type: usb
vendorid: 1cf1
ephemeral: false
profiles:

  • default
    stateful: false
    description: “”

Yours may be a different problem than what I just went though but sounds very similar and it only started happening after I installed Docker on my LXD Host.

In my case 2 days ago I installed Docker on my LXD Host.
Yesterday I created an LXD VM using Ubuntu 22.04 image (lxc launch ubuntu:22.04 vm1 --vm)

VM1 would be created and start ok but I had strange problems with it.

I did a quick search and found this 7 month old Thread which lead me to the root of the problem in my case (which was the fact that I had installed Docker on my LXD Host):

In particular this comment in that “thread” pointed to Docker:

Thread Comment by Peter Lundgren - Perlun

If you have both Docker and LXD installed see if this helps.

Read the “Note on #4 at the bottom.