I’ve created a fresh ubuntu host with the latest docker version installed on it. But it seems I cannot work how to access nginx containers (using them for testing purpose only) that are created in the default bridge network via their assigned IP but I can access them via the host machine IP with local port.
Example: my nginx has IP 188.8.131.52 with ports: 32772:443 32773:80 . When I try to open it in the browser I get connection timed out. But when I type 192.168.200.15:32773 it works. I’ve checked - nginx has network access (ping to 184.108.40.206 works) so it seems for me that something is restricting the traffic to the bridge network.
I’ve changed the default bridge network IP via deamon.json file (the file only contains this line): “bip”:“220.127.116.11/24” (reload, restart without any issues).
ifconfig shows for the docker0 interface:
docker0: inet 18.104.22.168 netmask 255.255.255.0 broadcast 22.214.171.124
My network admin said he added the necessary routes on our local gateway, I also have a second /24 network dedicated for this host - 126.96.36.199/24 (nginx in that network works without problems on bothj 172,x and 192.x:port addresses). Both networks have internal: false while using docker network inspect.
Am I missing something in the configuration or I need to harass my network admin to verify if he really did setup the routes correctly?
Ubuntu 20.04.1 LTS
Docker version 19.03.13