Contents

Bridge mode with access to local network in Incus

After the problems with LXD from Canonical, I was left with no choice but to switch to Incus (the new LXD). My problems began when I couldn’t make a container accessible from the local network with a bridge interface, as indicated by hundreds of tutorials on the internet. The only way I was able to achieve access was by creating a network bridge using Open vSwitch.

Installing and Configuring Open vSwitch

In my case, I used Arch Linux, so I followed the official guide for installation and creation of a bridge.

Bridge Interface
Let’s not forget that the physical interface that will be attached to the bridge interface should not be configured, meaning it should not have an assigned address.

Creating a Profile in Incus

Now that we have the bridge interface, let’s say br0, we need to create a profile to use it in our containers:

1
2
3
4
5
6
7
8
9
config: {}
description: Bridged networking LXD profile
devices:
  eth0:
    name: eth0
    nictype: bridged
    parent: br0 # here we put the name of the bridge interface
    type: nic
name: bridge-prof

We can add the profile through the command line or using the Incus web interface.

/devops/incus/bridge/images/screen1.png
Figure 1: Creating a new profile

And from now on, the containers are accessible from the network.

Sources: