Network is unreachable inside a Incus Container/VM

Incus: 6.6 (same for 6.0 LTS) via APT
Host: Ubuntu 22.04

After creating a container and a VM I’m not able to connect to Internet from the guest system:

> incus launch images:ubuntu/22.04 first
> ping 1.1.1.1
ping: connect: Network is unreachable

Network info:

> # host os
config:
  ipv4.address: [redacted]/24
  ipv4.nat: "true"
  ipv6.address: [redacted]::1/64
  ipv6.nat: "true"
description: ""
name: incusbr0
type: bridge
used_by:
- /1.0/instances/first
- /1.0/profiles/default
managed: true
status: Created
locations:
- none
project: default
> ip addr # guest os
1: lo: ...
13: eth0@if14: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:16:3e:f0:e1:b8 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fd42:8c6:ea55:7529:216:3eff:fef0:e1b8/64 scope global mngtmpaddr noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:fef0:e1b8/64 scope link
       valid_lft forever preferred_lft forever

On the host side, dnsmasq is running:

ps fauxww | grep -i dnsmasq
incus 54900 0.0 0.0 14900 4992 ? Ss 15:25 0:00 _ dnsmasq --keep-in-foreground --strict-order --bind-interfaces --except-interface=lo --pid-file= --no-ping --interface=incusbr0 --dhcp-rapid-commit --no-negcache --quiet-dhcp --quiet-dhcp6 --quiet-ra --listen-address=[redacted] --dhcp-no-override --dhcp-authoritative --dhcp-leasefile=/var/lib/incus/networks/incusbr0/dnsmasq.leases --dhcp-hostsfile=/var/lib/incus/networks/incusbr0/dnsmasq.hosts --dhcp-range [redacted,redacted],1h --listen-address=[redacted] --enable-ra --dhcp-range ::,constructor:incusbr0,ra-stateless,ra-names -s incus --interface-name _gateway.incus,incusbr0 -S /incus/ --conf-file=/var/lib/incus/networks/incusbr0/dnsmasq.raw -u incus -g incus

IPtables only contains rules created by ufw, and it only contains ssh rules for the system:

To                         Action      From
--                         ------      ----
22                         ALLOW IN    Anywhere
22/tcp                     ALLOW IN    Anywhere
22 (v6)                    ALLOW IN    Anywhere (v6)
22/tcp (v6)                ALLOW IN    Anywhere (v6)

I disabled ufw and it worked.
I need to read this one: How to configure your firewall - Incus documentation

1 Like