docker containers can't access from the Intelnet


Recommended Posts

port mapping config:

image.thumb.png.93e0fa0b880556604bbccf6f69578e1f.png

unraid network config

image.thumb.png.c224c19fb94f2f94a2c41030f13a7cb8.png

unraid routing Table:

image.thumb.png.4590f83fa7719f0eb12af93bf012b196.png

unarid docker containers:

image.thumb.png.69a3ea3614eb649492a8589b9b5a16eb.png

vms:

image.thumb.png.4147b58f2a308d165bce74b28221a931.png

 

run a docker container on vm of ubuntu server with commond "docker run --name nginx-test -p 8088:80 -d nginx"

 

now I have two nginx docker containers one run on unraid and another run on ubunt userver

but I can't access the the container run on unraid. same as other container which run on unraid.

so how to fix this ?

hope for your reply ,thanks!

image.thumb.png.8628f8f0e8d32fec274d40e330b70041.png

network topography:

image.png.a930ffc623045f917789e8071c3c3a53.png

 

image.png

image.png

Edited by sheiy
Link to comment

have you tried putting the nginx docker container on the br0 network and assigning it its own ip address and then changing your port forwarding on the router to point to the new docker ip address?

 

Also your network topography isn't very clear from your picture. Looks like you are running openWRT as  a VM and then using that as your gateway?  Yet in our diagram you have your unraid server showing to be routed to the router (192.168.100.100)?  From your routing tables that doesn't seem to be the case.  You have no default route from the unraid server to the router only uraid to br0.  So if I am understanding it correctly it is actually like this:   

unraid server (192.168.100.1) ----> openWRT VM (192.168.100.250) -----> router 192.168.100.100.  ---> modem.  

 

Unless you have the openWRT VM set as the DMZ you should have portforwarding setup from the router to openwrt and then from openwrt to unraid?  So it would need two different levels of portwarding.

 

Have you spun up another docker image besides nginx and then done all of the portforwarding to rule out ngnix being the cause?  And how about taking openwrt out of network and having a default route from unraid to the router?  This would rule out the openwrt vm from being the cause.

 

And how do you know all of your port forwarding is done correctly?  What makes you say that?  

Link to comment
11 hours ago, mikeylikesrocks said:

have you tried putting the nginx docker container on the br0 network and assigning it its own ip address and then changing your port forwarding on the router to point to the new docker ip address?

 thanks for you reply very much. I can access nginx from the Internet when use br0

image.thumb.png.842da5a7d794fede394eac3ea10f2f94.png

 

11 hours ago, mikeylikesrocks said:

Also your network topography isn't very clear from your picture. Looks like you are running openWRT as  a VM and then using that as your gateway?  Yet in our diagram you have your unraid server showing to be routed to the router (192.168.100.100)?  From your routing tables that doesn't seem to be the case.  You have no default route from the unraid server to the router only uraid to br0.  So if I am understanding it correctly it is actually like this:   

unraid server (192.168.100.1) ----> openWRT VM (192.168.100.250) -----> router 192.168.100.100.  ---> modem.  

Yes I running a openWRT as a vm and using that as my gateway. Where showing the unraid server routed to the 192.168.100.100? It is just conecte to 192.168.100.100 but the gateway is 192.168.100.250. Yes my network is "unraid server (192.168.100.1) ----> openWRT VM (192.168.100.250) -----> router 192.168.100.100.  ---> modem.  "

 

11 hours ago, mikeylikesrocks said:

Unless you have the openWRT VM set as the DMZ you should have portforwarding setup from the router to openwrt and then from openwrt to unraid?  So it would need two different levels of portwarding.

Why I need do this ?When the docker container of nginx run on UbuntuServer VM I just set the portforwarding on my router not set on openWRT.

 

11 hours ago, mikeylikesrocks said:

And how do you know all of your port forwarding is done correctly?  What makes you say that? 

 I set a portforwarding for unraid and I can access it from the Internet . I just copy that and modify the LAN port and WAN port to set the nginx portforwarding

why it is not correctly?

 

Edited by sheiy
Link to comment

The problems you are having are due to your network setup and not Unraid.  You would probably get better help by asking questions on reddit r/homelab or 

r/HomeNetworking or another forum that is more specific to networking problems.

 

openwrt is acting as another firewall limiting access to anything on the bridge network which you proved by changing your nginx container to be on br0 which solved your problem.  If you want nginx to work on the bridge network you also need to forward ports from router to openwrt to 192.168.100.1  or you need to change your gateway to the router address.  Either solution should solve your problem.

Link to comment
5 hours ago, mikeylikesrocks said:

The problems you are having are due to your network setup and not Unraid.  You would probably get better help by asking questions on reddit r/homelab or 

r/HomeNetworking or another forum that is more specific to networking problems.

 

openwrt is acting as another firewall limiting access to anything on the bridge network which you proved by changing your nginx container to be on br0 which solved your problem.  If you want nginx to work on the bridge network you also need to forward ports from router to openwrt to 192.168.100.1  or you need to change your gateway to the router address.  Either solution should solve your problem.

ok,I really appreciate your reply.

But I'm very curious that why when the nginx container run on ubuntuserver I can access that from the Internet?

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.