Jump to content

How to configure ports if you set network to None and pass network through to another container?


l2evy

Recommended Posts

Unraid Version : 6.10.0 RC4

 

I have some containers I am trying to setup and route them all through a OpenVPN container. (from community apps)

Some have a webUI using port 8080 on the container. 

 

I set the containers network to None, and extra parameters set --net=container:OpenVPN , change the ports to something other than 8080 and install. The container installs fine, starts up but it ignores my port settings and uses default ports including 8080 for the webUI which causes conflicts. I suspect if you set the network to none, it ignores any port settings you specify cause without a network they are not necessary.

 

How does one go about setting the ports in a situation like this? I suspect others have ran into this issue as having each container use a separate instance of your paid VPN service will put you over the limit on simultaneous uses at some point if you add enough containers.

 

I have enabled advanced options in the docker settings so I have access to more things, tried editing the container port on creation with the extra options and it still invalidates any settings you do and reverts to using the default ports regardless. 

Edited by l2evy
Link to comment

Ahh I see. That would leave me stranded with some containers on community apps that have no real config files or WebUI to adjust the ports and they are only set on creation of the container.  I suppose the only solution would be to custom setup my own container entirely from the start so I can configure the ports differently. I remember you could edit the raw container creation template (as xml I believe on creation) before at some point I think, however the option seems to be gone now.

 

On the network side of things, If I understand correctly when you set network to none and force it through to another container, it is then considered "raw" directly to the other container which is why no edits to the ports on creation of the container take effect as it then is irrelevant there. Also if the container you route has a WebUI you then configure the container it is connected to (In my case OpenVPN) and add the WebUI port so you can access it.

 

I have applied this new understanding to some containers and it seems to be working for containers that have the option of config edits or WebUI though. Progress

 

Edit:

When you do route the container network to another container, I assume the "Port Mappings (App to Host)" for that container is to be ignored?

They have no IP and just show port maps. For example " :8080/TCP <-> :8080 "

 

Edit 2: 

Quote

I remember you could edit the raw container creation template (as xml I believe on creation) before at some point I think, however the option seems to be gone now.

 

Compose.Manager by dcflachs in the Community Apps is a plugin that is enabling docker compose management and will likely help make your own custom containers for situations like this a bit easier. This should help alleviate my issue but have yet to get down to it myself cause I am redoing my whole home network.

 

Also the Unraid 6.10 RC's have added functionality to set containers network to a wireguard VPN in Unraid (Settings > VPN Manager), so this might actually be a solution to allow port edits while retaining the ability to pass through a VPN.

Edited by l2evy
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.

×
×
  • Create New...