I’m running Docker CE 25 on Ubuntu Linux 22.04. I have numerous KVM VMs routing ip through bridges br25 and br50.
br25: 192.168.25.0/24
br50: 192.168.50.0/24
docker/kvm host: 192.168.1.205
I recently had an issue where VMs from br25 were unable to connect to any container on the docker host. I found an acceptable with defining the bridge in /etc/docker/daemon.json
:
{
"bridge": "br25"
}
However I’ve now arrived at a point where I also need VMs from br50 to connect to containers on the docker host but not understanding how to define multiple bridges in daemon.json
.
One solution, which I tentatively have in place, is the following. This allows VMs from both bridges to connect to containers but is a horrible longer term solution for obvious reasons:
{
"iptables": false
}
And lastly, network_mode: host
may be used but this too defeats features brought by use of Docker.
I found a good deal of discussion on this topic but none of it clearly illustrates a solution for my use case or my level of knowledge. I’m leaving some of them below. I continue to review these items and will post an update if I arrive at something satisfactory.
I’m hoping to get some help here in the form of an explanation, workaround, or walk through on how to solve and better understand this issue.
-
Starting Docker breaks KVM bridged networking
Docker - ArchWiki -
Docker breaks libvirt bridge network
iptables - Docker breaks libvirt bridge network - Server Fault -
Networking between KVM VM and docker container on same host
As a newcomer to this forum I’m unable to post more than two links. This discussion can be found by it’s title via general search or serverfault_com.