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.

Assign Docker to Physical NIC

Featured Replies

Good Morning,

 

I believe what I'm asking is possible, but would like to verify and to see the best way to do it.  Basically I would like to assign Docker to one physical NIC on my host, and then the unRaid GUI/VM's to the second physical NIC.

 

Related (but less important), is it possible on a container by container basis to assign what NIC it will go to... similar to the idea of CPU pinning?

 

Thanks!

 

~Spritz

I think I've seen posts about doing this through the pipework app

 

Sent from my LG-D852 using Tapatalk

 

 

  • Author

I think I've seen posts about doing this through the pipework app

 

Sent from my LG-D852 using Tapatalk

 

A quick google didn't turn up anything... what is this app you speak of?

 

Thanks!

 

~Spritz

It's in CA

 

Sent from my LG-D852 using Tapatalk

 

 

Hi I do something similar,

 

I have 2 nics, eth0 (192.168.1.#) & eth1, eth0 (192.168.2.#) is my normal home network and so I connect to my unraid over this network and then I have eth1, which is connected to a separate router, which is connected to a VPN network.

 

I have plex running on one container which runs hosted over my eth0 network, so my TV's etc can get to it.

 

Then I have transmission and Sickrage running in bridged containers, at boot time I do a little jiggling around to get those 2 containers to send their traffic out over the VPN network.

 

I just switch wireless networks if I want to go out over the VPN or normal network.

 

This is my go file from /boot/config

#!/bin/bash

 

echo "1"

mkdir -p /mnt/btrfs

echo "2"

btrfs device scan

mount -t btrfs /dev/sdj /mnt/btrfs

/etc/rc.d/rc.docker stop

sleep 20

ifconfig eth1 plumb

ifconfig eth1 up

brctl addbr br1

brctl addif br1 eth1

ifconfig br1 inet 192.168.2.100 netmask 255.255.255.0 broadcast 192.168.2.255 up

/etc/rc.d/rc.docker start

 

echo "lets set our container routes"

sleep 60

 

#get the container id of transmission and SAB

Transid=`docker ps | grep transmission | cut -b 1-12`

RAGEid=`docker ps | grep rage| cut -b 1-12`

 

#now find the process id for the container.

TransProcID=`docker inspect -f '{{.State.Pid}}' $Transid`

RAGEProcID=`docker inspect -f '{{.State.Pid}}' $RAGEid`

 

#create the links to allow us to use netns to change variables within the container.

mkdir -p /var/run/netns

ln -s /proc/$TransProcID/ns/net /var/run/netns/$TransProcID

ln -s /proc/$RAGEProcID/ns/net /var/run/netns/$RAGEProcID

 

# use netns to change the default root to use the vpn connection.

ip netns exec $TransProcID route del default gw 192.168.2.100

ip netns exec $TransProcID ifconfig eth0 down

ip netns exec $TransProcID ifconfig eth0 inet 192.168.2.10

ip netns exec $TransProcID route add default gw 192.168.2.1

ip netns exec $TransProcID ifconfig eth0 up

 

ip netns exec $RAGEProcID route del default gw 192.168.2.100

ip netns exec $RAGEProcID ifconfig eth0 down

ip netns exec $RAGEProcID ifconfig eth0 inet 192.168.2.20

ip netns exec $RAGEProcID route add default gw 192.168.2.1

ip netns exec $RAGEProcID ifconfig eth0 up

 

# Start the Management Utility

/usr/local/sbin/emhttp -p 9090 &

 

 

There may be a much cleaner way to do this now, but I set my server up a few years back.

 

Cheers

  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

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.