Help on single NIC, multiple IP config

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Help on single NIC, multiple IP config

      Hi!

      I use OMV a lot and I also use the docker feature a lot on the OMV server. But having several web enabled container running, I am running out of ports. And changing default ports of certain containers makes life hard, as you have to remember these or you need to reconfigure depending things...

      Before using docker, I had virtual machines running in virtualbox, but I found it very unpleasant as it locks too many resources. Docker runs far more smooth on my AMD64 based server. However it was very simple to set a specific IP to each running image in virtualbox.

      So I thought, it must be simple to set a separate IP for each docker container too... But I failed. All I was able to, was to kill my OMV in a way that it doesn't react anymore. I need to check it tonight, when I get back home.

      Is there a simple way to add multiple IPs to OMV on a single NIC that then can be routet to the different docker container?

      And sorry for the probably dump question, but even I run OMV for many years now, it was so easy to configure, I never had to dig into it very deep.
    • Thanks @macom but I have a question to this.

      I found that macvlan setting in the OMV GUI but hassled to set it up, as vlan sounded to me like something I set up for dividing internal network and guest network on my UniFi switches and access points. So allow me a few additional questions:

      The macvlan option can be set per docker container, but sounds like a setting for the docker system. What I need is a single additional IP for two of my 5 containers which should be in my internal IP address range.
      My net is 192.168.1.0/24 (gw=192.168.1.1)
      My OMV is 192.168.1.20
      Nexcloud Docker should use 192.168.1.21
      pihole Docker should use 192.168.1.22

      The macvlan examples look like they always span another network inside the container? Can or must I span a network on the container that is exactly the same as the real network connected to the physical NIC? And how do I set the specific IP the server should have?
    • Ups, seems that I opened another request on the same issue... But more closer to OMV...

      I added virtual interfaces to my primary ethernet interface. I can now address these interfaces in the docker configuration and that part works really good. So all this complicated macvlan and routing is not needed.

      However I ran into the issue, that OMV just acquires any available ethernet interface for itself. The problem, that OMV is blocking ports, that are needed by my docker containers hasn't changed as OMV now attaches to all available virtual interfaces too.

      And if I force OMV to the main IP address, it always overwrites this setting when I save the configuration. As a result, nginx crashes with ports already in use...