Skip to content

Networking

Incus networking can be simple NAT for labs or advanced routed/bridged/OVN networking for larger environments.

Official docs:

  • Networks: https://linuxcontainers.org/incus/docs/main/explanation/networks/
  • Network how-to guides: https://linuxcontainers.org/incus/docs/main/howto/network_create/

See networks

incus network list
incus network show incusbr0
incus network info incusbr0

Most simple hosts use a managed bridge such as incusbr0 with NAT.

Instance IP addresses

incus list
incus info web-01
incus exec web-01 -- ip addr
incus exec web-01 -- ip route

Add a NIC device

incus config device add web-01 eth0 nic network=incusbr0 name=eth0

Most instances already get this from the default profile.

Static DHCP lease on a managed bridge

For a stable lab IP, set the NIC IPv4 address:

incus config device override web-01 eth0 ipv4.address=10.10.10.50
incus restart web-01

Verify:

incus list web-01

This works when the network is an Incus-managed bridge with DHCP.

Proxy device for port forwarding

Expose host port 8080 to instance port 80:

incus config device add web-01 http proxy listen=tcp:0.0.0.0:8080 connect=tcp:127.0.0.1:80

Remove it:

incus config device remove web-01 http

Security note: binding to 0.0.0.0 exposes the port on all host interfaces. Use firewall rules or bind a specific address when needed.

Bridge to the LAN

For LAN-addressed instances, create or use a bridge connected to your LAN. Exact commands depend on your host network manager.

Typical Incus side:

incus network create lanbr0 --type=bridge
incus config device add web-01 eth1 nic network=lanbr0 name=eth1

For production-like LAN bridging, document:

  • bridge name;
  • physical NIC;
  • VLAN ID if used;
  • DHCP/static IP plan;
  • firewall rules.

DNS names

Incus managed bridges can provide DNS for instance names. Check the network domain:

incus network get incusbr0 dns.domain

Set a lab domain:

incus network set incusbr0 dns.domain lab.local

Then instances may resolve as web-01.lab.local from clients using the bridge DNS.

Troubleshooting network issues

incus network list
incus network show incusbr0
incus list
incus exec web-01 -- ip addr
incus exec web-01 -- ip route
incus exec web-01 -- ping -c 3 1.1.1.1
incus exec web-01 -- getent hosts example.com

Common causes:

  • instance has no NIC device;
  • wrong profile attached;
  • duplicate static IP;
  • host firewall blocks forwarding;
  • DNS works on host but not inside instance;
  • proxy device listens on the wrong address or port.