Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Custom Docker network on non-default NIC

Featured Replies

Hi,

 

I have an onboard RJ45 + a quad port Intel I350-T4.

The onboard port (eth0) is set on 192.168.10.12 and is connected to my default vlan.

 

I'm trying to setup a custom Docker network so that all my containers are running inside a different vlan.

I've configured the port (eth2) for the containers to use 192.168.41.2 as you can see here.

 

image.thumb.png.0de134d52ea134f24f6881798291c8a4.png

 

If I set a container to use the network "Custom : br2 -- Docker", the container gets a unique IP in the 192.168.41.X range which is the expected behavior.

What I want is to get all my containers running behind the IP I've configured for this interface (192.168.41.2) so for that I created a custom docker network using the following command:

 

docker network create -o com.docker.network.bridge.name=br2 apps

 

Now when I set a container to use the newly created "apps" network, it gets an "internal" ip in the 172.X.X.X range (which is what I want) but this range gets behind the 192.168.10.12 IP instead of 192.168.41.2.

 

Any idea what I'm doing wrong here?

 

Thank you in advance for helping me sort that issue out!

  • Author

I still haven't been able to make that part work, anybody to assist?

  • 2 months later...

Have you seen this topic

 

I used to do the same thing but with no luck, it seems that the custom docker network created with "bridge" driver can't be attached to any physical NIC, because it is mediated by layer 3 forwarding and NAT rules in your iptables nat table, so maybe you can make it work with some iptables management, see stackoverflow - How to make docker only use a eth1 interface to communicate with other hosts? 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.