Docker Community Forums

Share and learn in the Docker community.

Remotely Accessing Containers

Hi,
I’ve pretty much scraped the bottom of the internet and I don’t understand how I cannot find a solution to this problem of remotely accessing my containers.

My Asustor as5304t sits on a static ip address in another room on 192.168.1.148, my main machine that I used to configure everything sits on a static ip address of 192.168.1.100, whenever I try to connect to ‘any’ container by means of a web browser in this instance we’ll use ‘Portainer-CE’ as an example on 192.168.1.148:19900 I encounter ‘ERR_CONNECTION_TIMED_OUT’, if I access the the Asustor AS5304T from the lounge directly thought the TV however everything works out fine because it’s ‘localhost’, but accessing from any other device is blocked.

— Assuming that Portainer-CE is communicating through the bridge connection, the IP address of 172.17.x.x is wrong in fact the entire address is wrong, do I need to change this to be on the proper network address 192.168.1.x or am I missing something?

root@Lauren:/volume1/.@root # docker network inspect bridge
[
{
“Name”: “bridge”,
“Id”: “88608dc609366d411b0db70746ca6ca3d0d3bed90c57aea2c63e6dfaea2f873e”,
“Created”: “2021-06-14T22:38:02.031899468+12:00”,
“Scope”: “local”,
“Driver”: “bridge”,
“EnableIPv6”: false,
“IPAM”: {
“Driver”: “default”,
“Options”: null,
“Config”: [
{
“Subnet”: “172.17.0.0/16”,
“Gateway”: “172.17.0.1”
}
]
},
“Internal”: false,
“Attachable”: false,
“Ingress”: false,
“ConfigFrom”: {
“Network”: “”
},
“ConfigOnly”: false,
“Containers”: {
“15d47b855aee1e12c1e6b6e941b93ca0fc61a14e971c79503c29db0d5ab93698”: {
“Name”: “PortainerCE”,
“EndpointID”: “e87c16f09bb82d41ef472da654cedde09ad86e0d8bb67950d61c8f72e9048215”,
“MacAddress”: “02:42:ac:11:00:02”,
“IPv4Address”: “172.17.0.2/16”,
“IPv6Address”: “”
}
},
“Options”: {
“com.docker.network.bridge.default_bridge”: “true”,
“com.docker.network.bridge.enable_icc”: “true”,
“com.docker.network.bridge.enable_ip_masquerade”: “true”,
“com.docker.network.bridge.host_binding_ipv4”: “0.0.0.0”,
“com.docker.network.bridge.name”: “docker0”,
“com.docker.network.driver.mtu”: “1500”
},
“Labels”: {}
}
]

A bridged network in docker is like a private network. Publishing ports is like forwarding ports in a nat router (very similar in behavior but not identical). Thus said, the bridge network’s ip range looks fine to me.

Though did you publish a port? And use the NAS’ses ip or host name and the host side of your published port mapping to access the container?

I’m not a networking guru, but does a ping work? :blush: