Docker network on 2 interfaces

Hi !

I currently have a custom NAS with OpenMediaVault that has 2 network interfaces (ep2s0 @IP and ep3s0 @IP and I am using Docker on it. Until now, I had only activated the ep2s0 interface on my NAS, and the Docker bridge network is using the IP

Now, I would like to create a Docker (bridge) network that uses the ep3s0 interface (, but I cannot find how to specify to Docker which interface to use when creating a network. The goal is to deploy an AdGuard container on this new ep3s0 interface, as it needs to open many ports that I am already using on my ep2s0 interface.

When you search for this issue, you will find suggestions to add ip tables rules

  1. Bridged Network Source NAT — Kasm 1.15.0 documentation
  2. Unable to choose outbound (external) IP for containers · Issue #30053 · moby/moby · GitHub

Interestingly I had to search for --to-source in the moby sourcecode to find the label which is actually mentioned on the second linked page.

So basically you can create a network like this:

docker network create net_4_192 \

or in compose


Note: When I used this label and chose a the IP address which was not in the same subnet as the destination IP (my local machine from a virtual machine created by multipass), the request was really slow. Hopefully it will not for you.