I’m trying to set up a container so that the router can “see” it.
$ incus network show incusbr1
config:
bridge.driver: openvswitch
ipv4.address: 192.168.100.1/24
ipv4.nat: "true"
ipv6.address: fd42:de90:5601:e609::1/64
ipv6.nat: "true"
description: supposed to be a vSwitch
name: incusbr1
type: bridge
used_by:
- /1.0/instances/test
- /1.0/profiles/bridgeprofile
managed: true
status: Created
locations:
- none
project: default
I can access the internet from inside the container, and address it from the Host system. My firewall is set to let all traffic from inusbr1 pass.
Looking around online, it seemed like I needed an Open vSwitch bridge, and I now have that, but I don’t have the desired effect of being able to accessing it from elsewhere on the network.
I do it in a different way. I create a bridge on my host then attach its network card to the bridge. Once that is working, I edit my Incus profiles to use the bridge.
When I launch an instance that uses this profile my router assigns IP addresses from my local network to the instances and provides routing across the whole network.
Generally, I use the nmtui tool from NetworkManger to setup this sort of network.
I have posted a few times on this topic. It seems like we could create a tutorial or add it the FAQ.
I’d be happy to help, but I’m very new to this so am unlikely to be of much use.
Today I’ll try creating a bridge separately, as you suggest, though I’ll be doing it through Nix files. The biggest thing I learned after using Arch for 10 years without reinstalling is that I forget what’s what, so I’m trying to stick with the NixOS Way so long as it isn’t too impractical.
I’d very much appreciate you sharing those other posts you mentioned.
Thanks. I seem to have set up a bridge with NetworkManager, and I think I connected it to Incus correctly, but no IP addresses are being assigned to containers using the bridge. I made sure the firewall is allowing traffic through.
edit: In face it matters, my router’s subnet is 192.168.50.xxx, not 169.whatever. I’d change that, but last time I did something like that, I lost all network connectivity.
15: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 8a:a2:08:48:b6:c6 brd ff:ff:ff:ff:ff:ff
inet 169.254.74.210/16 brd 169.254.255.255 scope global noprefixroute br0
valid_lft forever preferred_lft forever
I’m the test container using that bridge isn’t receiving any IP addresses (v4 or v6). I tried disabling my firewall, thinking that could be it, but that didn’t help.
I would set it to automatically connect. That is a setting on the bottom.
You will all need to set the network card of your host as a slave for the bridge. My system calls them slaves. It looks like yours might call them ports. You seemed to have that setup before.
The correct subnet should be set automatically. I can’t tell you what it is since I don’t have access to your router.