Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution for IP addresses that change #129

Closed
Bramblefoot opened this issue Mar 19, 2022 · 8 comments
Closed

Solution for IP addresses that change #129

Bramblefoot opened this issue Mar 19, 2022 · 8 comments

Comments

@Bramblefoot
Copy link

First off, thanks for making this project. It makes running/managing these containers easy.
I would like to offer a suggestion for a problem I have.
The problem is ip addressing.
When using the system provided bridge network, you cannot assign ip addresses. And occasionally during updates or some other activities where containers get restarted or stopped and started, they come back up with different ip addresses. This can cause havoc when containers point to other containers' docker IP address. (ie. 172.17.0.x) A container get it's ip based on first come first served order in the systems bridge network, so ips can change for a specific container.
Some might suggest using the hosts ip and containers associated port, but that has never worked for me. That would be a great solution since the hosts ip never changes and neither do the ports. But alas I have to use docker network's ip.
Solution 1:
I'd be willing to change over to using the host ip, provided I could actually get it working.
Solution 2:
If we created a new Mediabox bridge network, you can assign ips to containers. Then no matter what order they start in, they will have the same IP.

@tom472
Copy link
Owner

tom472 commented Mar 20, 2022

Thanks for the comments - much appreciated.
There shouldn't be any references to the 172.X "docker network" IPs.
The project is meant to use the host machine IP for all references.
What individual container's or settings are you using the 172.x IPs for/in?

@Bramblefoot
Copy link
Author

Bramblefoot commented Mar 20, 2022 via email

@tom472
Copy link
Owner

tom472 commented Mar 21, 2022

So when you try to open anything from the Homer start page they all go to host IP:port are you saying that none of those ever open or load for you?

What about if you go into Portainer and then into the stack info for the Medaibox stack.
At the far right there will be a column that says "Published Ports" and those will be links to the applications again via host IP:port -- do those open for you?

If neither of those are working / opening for you something is for sure wrong - there should be no need for and no use of the Docker 172.x net IPs necessary at all when using Mediabox.

Is your host PC IP address being detected correctly?
At the bottom of the "Getting Started" page there is a "Troubleshooting" section that shows the details being used.
Can you verify that the IP_AADRESS line is correct for the IP address of your host PC?

@Bramblefoot
Copy link
Author

Bramblefoot commented Mar 21, 2022 via email

@tom472
Copy link
Owner

tom472 commented Mar 21, 2022

OK so I am not really following:

The 1 container that is exposed to the internet via nginx, the nginx
sites-available file points to the host:port.
But, when setting up containers, using the host:port doesn't work. But
using the 172 network does.

What container is exposed to the internet?
Mediabox does not expose anything to the internet in its config.
And what do you mean by "when stetting up containers using the host:port doesn't work."
Setting up what exactly?
You just mentioned that via Homer, Portainer, Muximux it all works - so that is host IP:port working.
Using that same info in the containers should work exactly the same.

For example:
In Overseerr - my settings for Radarr and Sonarr are set for the host IP:port
Same with copying a Torznab Feed Link from Jackett - it creates a link with host IP:port/feed/etc.. and using those in Sonarr and Radarr works totally fine.

Additionally - no one has had this issue before or asked about this here or needed a fix.
If this were an issue and the behavior of Mediabox there would be more talk about it I'd think.

@Bramblefoot
Copy link
Author

Bramblefoot commented Mar 21, 2022 via email

@Bramblefoot
Copy link
Author

Bramblefoot commented Mar 21, 2022 via email

@tom472
Copy link
Owner

tom472 commented Mar 21, 2022

Glad you got it figured out --

I don't think I have specific instructions for the UFW to be off - so that might be something I'll add to the docs.
However per the Ubuntu docs turning it on would be a user selected action.

ufw by default is initially disabled.

So while I don't specifically mention that it should be off - the default setting on an Ubuntu install is off.
And thus if it is turned on then yes it would be on the user to open/add/allow any necessary ports.

Yes this the intended design and config of Mediabox.
Nothing is exposed inbound from the internet except for Plex which already has built-in security.
The rest of the applications and configuration are meant to be open to your internal network, as that should be secured by other means.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants