LXD container has no network access

I have Ubuntu Server 16.04, lxd 2.20, machine currently connected by wifi to a home router. I want to run an owncloud server from an LXD container and I figure that the container will likely need to appear independently on the LAN so I have attempted to create a bridge but my container can’t seem to access the internet. Below I run some diagnostic commands, enter the container ‘test’ and attempt to connect to the internet. Is this some problem to do with ipv6 in the container and ipv4 on the host? How can I fix it? Any suggestions greatly appreciated! (output abridged slightly for readability, as indicated by […] )

indigo@ubuntu-server:~$ lxc network list +-----------------+----------+---------+-------------+---------+ | NAME | TYPE | MANAGED | DESCRIPTION | USED BY | +-----------------+----------+---------+-------------+---------+ | br0 | bridge | NO | | 1 | +-----------------+----------+---------+-------------+---------+ | enp2s0 | physical | NO | | 0 | +-----------------+----------+---------+-------------+---------+ | wlx08ea40f56e76 | physical | NO | | 0 | +-----------------+----------+---------+-------------+---------+ indigo@ubuntu-server:~$ lxc network show br0 config: {} description: "" name: br0 type: bridge used_by: - /1.0/containers/test managed: false indigo@ubuntu-server:~$ cat /etc/network/interfaces

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto br0
iface br0 inet dhcp
bridge_ports enp2s0

iface enp2s0 inet manual
indigo@ubuntu-server:~$ lxc network show br0
config: {}
description: “”
name: br0
type: bridge
used_by:

Looks like your bridge is connected to your ethernet interface, not wifi, so that’s unlikely to work very much unless your machine is also connected over ethernet.

Note that bridging the wifi device wouldn’t work either as the security model of WiFi is MAC based and therefore not compatible with bridging.

You either need to get some wired connectivity to your system so you can do bridging, or you need to have a routed subnets for your containers.