Multiple IP's and choosing which to bridge?


Recommended Posts

Hi all hope someone can maybe point me in the right direction. I can see you can assign a specific IP to a docker image however you cannot then use this same ip on another for a different port. I have groups of 2 docker images that need to be on the same IP but different IP's between groups.

 

Example

Docker 1 - 192.168.0.4:80

Docker 2 - 192.168.0.4:443

 

Docker 3 - 192.168.0.5:80

Docker 4 - 192.168.0.5:443

 

I thought maybe assigning these IP addresses to unraid then choosing to bridge to them rather than the default IP of unraid.

 

Although honestly i'm kind of stumped on Unraid. On a general Linux system you can add extra IP's to interfaces and then pass them through to docker.

 

e.g. doing this on the host 

 

 

iface eth0 inet static

address 192.168.0.4
netmask 255.255.255.0

gateway 192.168.0.1

 

iface eth0:0 inet static

address 192.168.0.5

netmask 255.255.255.0

 

Then starting the dockers like so

 

docker run (whatever it is your running) -p 192.168.0.4:80:80

docker run (whatever it is your running) -p 192.168.0.4:443:443

 

docker run (whatever it is your running) -p 192.168.0.5:80:80

docker run (whatever it is your running) -p 192.168.0.5:443:443

 

Is it possible to do something like this on Unraid? Anyone point me in the right direction, Thanks!

 

 

Link to comment
  • 1 month later...

@NeoDudeHi, this is required as i wish to cache requests on port 80 but simply proxy requests on SSL. (Steamcache essentialy). They do this with two different docker images one caching the requests the other running sniproxy on 443. I need to be able to assign them the same IP so things like the steam store and friends lists function but game downloads go though the cache.

Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.