I have LXD instances attached to an LXD network and in each of those instances I’ve configured Netplan with static IP’s.
The LXD docs say, “Network ACLs can be assigned directly to the NIC of an instance or to a network. When assigned to a network, the ACL applies to all NICs connected to the network.”
The latter is what I am trying to accomplish. I’ve assigned ACL’s to a network so all my instances can access the internet. But they do not. I believe what the problem is, is that each instance is configured with static ip’s within Netplan and I’ve not correctly connected the LXD network to the host, and therefore the instances cannot access the internet.
I’ve tried creating a bridge and connecting the LXD network to it, but I also have a VPN connection on this machine and each time I loose all connectivity.
Also, as I have Docker on my host, I turn off the host firewall just to see if things work without Docker interfering, but no success.
Also, I have NetManager running on the host machine (Ubuntu 20.04). Can anyone help with a proper bridge setup to get the LXD instances access to the internet just by connecting the LXD network (not via each individual instance)?
Hi, thanks for your reply, I’ve been at this for awhile. Here’s another post for additional details, some things have been renamed. Each time I can’t get replies, I try to simply what I know and put it out another way.
$ lxc network acl show internet
name: internet
description: ""
egress:
- action: allow
state: enabled
ingress:
- action: allow
state: enabled
config: {}
used_by:
- /1.0/networks/mylan
I would rather check if docker is not interfering the bridge in the first place.
I had a very similar case where docker was the reason that lxd containers were unable to access the network although they worked just fine.
Maybe your issue is similar to
When I wanted to make sure in my case I tried something like
Not sure how docker can interfere with the bridge if the bridge isn’t connected in the first place. This is what I’m trying to understand.
I have an instance connected to an lxd network of type bridge, but how is that bridge connected to my host machines bridge br0. And then, shouldn’t I be able to ping the lxd bridge from the host and if that works, then I can worry about trying to get it through the firewall.
Although, I already knew of this (do have docker installed on my host) and did follow the instructions that allow for network traffic to pass at the end of the link provided.
br0 shows the bridge I created on the host and mylan is the LXD network I created.
$ lxc network list
+----------+----------+---------+-----------------+---------------------------+------------------------------+---------+---------+
| NAME | TYPE | MANAGED | IPV4 | IPV6 | DESCRIPTION | USED BY | STATE |
+----------+----------+---------+-----------------+---------------------------+------------------------------+---------+---------+
| br0 | bridge | NO | | | | 1 | |
+----------+----------+---------+-----------------+---------------------------+------------------------------+---------+---------+
| mylan | bridge | YES | none | none | | 3 | CREATED |
+----------+----------+---------+-----------------+---------------------------+------------------------------+---------+---------+