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.

[6.3.0+] How to setup Dockers without sharing unRAID IP address

Featured Replies

1 minute ago, CHBMB said:

Errr, I've kinda changed my approach now, doing it all at the firewall level.  But I did enjoy messing around with the macvlan stuff and I can definitely see how it would be very useful for others.

 

Your firewall solution is good, but with macvlan support you can do more... :)

 

E.g. it allows you to give individual dockers their own IP address (either dynamically or statically).

Say you want to run two web servers and both use port 80, this becomes a very easy task.

Docker isolation is also made very easy, e.g. run a docker within its own (local) network segment

  • Replies 175
  • Views 96.5k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • bonienl
    bonienl

    Perhaps you would be interested to know that macvlan support is added in the upcoming version of unRAID, it allows you to select additional 'custom' networks from the GUI.  

  • This is quite interesting. I've been looking into network segregation for Dockers in the past but couldn't make it to work properly.   I'll have a look at translating your approach to GUI support.

  • I think its permanent (as long as the docker.img is intact) since that's where all the docker related meta data is persisted. 6.3.0 used docker 1.12 which is when the macvlan plugin was released as

Posted Images

14 minutes ago, CHBMB said:

 

Thanks but I had it setup already since I found the guide over at Reddit a few days ago. Thanks though!

13 minutes ago, bonienl said:

Perhaps you would be interested to know that macvlan support is added in the upcoming version of unRAID, it allows you to select additional 'custom' networks from the GUI.

 

 

When is this coming?? I'm excited now :D

Yeah, that's where I started but it didn't work until I figured out the aliases.

Sent from my LG-H815 using Tapatalk

2 minutes ago, jrdnlc said:

 

When is this coming?? I'm excited now :D

 

Soon™ :)

 

Remember we are talking Release Candidate (RC) here, in other words for testing purposes and feedback!

Edited by bonienl

This all sounds very interesting but I'm afraid I'm a little short on the background to understand most of this. Could someone point me to a good vlan for dummies guide.

1 minute ago, wgstarks said:

This all sounds very interesting but I'm afraid I'm a little short on the background to understand most of this. Could someone point me to a good vlan for dummies guide.

 

Actually macvlan is the solution used by Docker, but from a GUI perspective this is hidden and the user is just presented with some additional network choices and doesn't need to worry about the underlaying translation.

 

 
Your firewall solution is good, but with macvlan support you can do more... [emoji4]
 
E.g. it allows you to give individual dockers their own IP address (either dynamically or statically).
Say you want to run two web servers and both use port 80, this becomes a very easy task.
Docker isolation is also made very easy, e.g. run a docker within its own (local) network segment

Oh yeah, absolutely, I just don't need to.... yet. Never say never.

Sent from my LG-H815 using Tapatalk

1 minute ago, CHBMB said:


Oh yeah, absolutely, I just don't need to.... yet. Never say never.
 

 

Yeah right... you don't have two or more dockers claiming the same TCP port :) 

I do, but atm it's as easy to change port as it is to change the ip. What macvlan will help me out with is testing. Currently got 4 instances of MariaDB and 3 instances of Nextcloud.

Sent from my LG-H815 using Tapatalk

You know what they say about Rome... there are several ways to go there!

 

Not sure if that is true after Brexit ;)

 

18 hours ago, bonienl said:

 

Your firewall solution is good, but with macvlan support you can do more... :)

 

E.g. it allows you to give individual dockers their own IP address (either dynamically or statically).

Say you want to run two web servers and both use port 80, this becomes a very easy task.

Docker isolation is also made very easy, e.g. run a docker within its own (local) network segment

 

The only thing needed is fitting this nicely in the interface, now if we could find someone who would be amazin at that....

1 hour ago, Helmonder said:

 

The only thing needed is fitting this nicely in the interface, now if we could find someone who would be amazin at that....

 

Just a little more patience...

  • 3 weeks later...
11 hours ago, zin105 said:

I just can't get this to work. When I try to access the WebUI of my container it times out. 

 

Here's a link to my network page; Picture

 

The IP address details are:
unRAID = 192.168.1.216
Gateway/router = 192.168.1.1
Subnet = 192.168.1.0/24

 

The command I wrote;

docker network create \
-o parent=br1 \
--driver macvlan \
--subnet 192.168.1.0/24 \
--ip-range 192.168.1.128/25 \
--gateway 192.168.1.1 \
docker1

 

Here's a link to the docker settings in question; Picture

 

Update; Here's the output of the commands listed in the OP. And yes, the container is started fully (green play button).

 


root@HTPC:~# docker inspect duplicati | grep IPAddress
            "SecondaryIPAddresses": null,
            "IPAddress": "",
                    "IPAddress": "192.168.1.213",
root@HTPC:~# docker exec duplicati ping www.google.com
rpc error: code = 2 desc = containerd: container not started

 

This is the output of a different container I tried it on. Gives a different result.

 


root@HTPC:~# docker exec observium ping www.google.com
ping: unknown host www.google.com
root@HTPC:~# docker exec observium ping 8.8.8.8
connect: Network is unreachable

Do it like this instead FPA0ZpW.png

 

  • Author
11 hours ago, zin105 said:

I just can't get this to work. When I try to access the WebUI of my container it times out. 

 

Here's a link to my network page; Picture

 

The IP address details are:
unRAID = 192.168.1.216
Gateway/router = 192.168.1.1
Subnet = 192.168.1.0/24

 

The command I wrote;

docker network create \
-o parent=br1 \
--driver macvlan \
--subnet 192.168.1.0/24 \
--ip-range 192.168.1.128/25 \
--gateway 192.168.1.1 \
docker1

 

Here's a link to the docker settings in question; Picture

 

Update; Here's the output of the commands listed in the OP. And yes, the container is started fully (green play button).

 


root@HTPC:~# docker inspect duplicati | grep IPAddress
            "SecondaryIPAddresses": null,
            "IPAddress": "",
                    "IPAddress": "192.168.1.213",
root@HTPC:~# docker exec duplicati ping www.google.com
rpc error: code = 2 desc = containerd: container not started

 

This is the output of a different container I tried it on. Gives a different result.

 


root@HTPC:~# docker exec observium ping www.google.com
ping: unknown host www.google.com
root@HTPC:~# docker exec observium ping 8.8.8.8
connect: Network is unreachable

 

Can you also show the outputs of

docker ps -a

and

docker exec [container] ip route

 

The errors seem to be related to something else.

 

Also, your unraid server is in the same group of addresses you told docker to use.

This is not a problem yet, but could be when something decides to use the same address by chance (unless all your dockers will have static ips)

Edited by ken-ji

1 hour ago, zin105 said:

The only things I see in that screenshot is that you have a manual WebUI adress and --restart on-failure?

Yes and look at your web ui link, it will not work with the [port] part, its needs a real link like mine. So just remove the brackets and the word port.

Edited by Porkie

Did you add the mac address and ip of the container as a static ip in your router? Im using PFSense and I had to manually add them for them to show up in the dhcp leases. It might not even be that but worth a try. 

  • Author

Hmm. Kinda assumed those were set since you were running a VM/container host under a hypervisor. But yeah. that's the last thing most people will think off.

  • 3 weeks later...

How would I change the commands in the OP if I wanted the IP range for my dockers to be from 192.168.1.224-192.168.1.254?  Is that possible?  Alternatively, how would the original commands change, and then the docker creation, if I wanted to use a static IP when creating a docker?

 

On May 1 a bunch of this stuff was said to be coming soon - presumably it has landed?  That isn't mentioned in this thread.  If so, in what version?

ok thanks - I need the DVB build for my TV tuners so I will have to wait until it comes out and you get the DVB build done.

11 minutes ago, wayner said:

How would I change the commands in the OP if I wanted the IP range for my dockers to be from 192.168.1.224-192.168.1.254?  Is that possible?  Alternatively, how would the original commands change, and then the docker creation, if I wanted to use a static IP when creating a docker?

 

On May 1 a bunch of this stuff was said to be coming soon - presumably it has landed?  That isn't mentioned in this thread.  If so, in what version?

6.4RC2 is the current version.

https://forums.lime-technology.com/topic/57823-unraid-os-version-640-rc-changes/

Edited by wgstarks

2 minutes ago, wayner said:

ok thanks - I need the DVB build for my TV tuners so I will have to wait until it comes out and you get the DVB build done.

 

I thought the dvb builds where done. TBS closed source is dead if that is what you are waiting for. 

No, I don't think I need that.  The main thing that I need from that build is the drivers for the Hauppauge HD-PVR and firewire.

 

I haven't updated for a bit so I am on 6.3.1.

Edited by wayner

6 minutes ago, wayner said:

No, I don't think I need that.  The main thing that I need from that build is the drivers for the Hauppauge HD-PVR and firewire.

 

I haven't updated for a bit so I am on 6.3.1.

 

There was some support for the Hauppauge card in one of the builds. Don't remember if it was the Libreelec or open source TBS. 

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.