Docker Community Forums

Share and learn in the Docker community.

Docker Containers not accessible outside of LAN

Overview:
I have Docker running several containers on an rack server running Ubuntu Server 18.04. Most of these containers provide a service that is accessible through a browser on a port other than 80. I setup a nginx container to provide the reverse proxy such that when I type <service1.mydomain.com> it will pass the request to the ip+port combination that hosts that service (the service is another docker container).

This works great from within my LAN. On any computer in my house I can type <service.mydomain.com> and have access to the container. I own mydomain and have DynamicDNS setup and ports 80 and 443 forwarded to the IP that nginx is running on.

Problem:
When I setup the containers to run on a macvlan network, I can access the services from outside of my LAN (at work, on my phone, etc). However, when I use the default Docker bridge network, the outside access is broken. I can still connect to the containers from within my house (LAN) but can no longer connect from outside my house.

Any ideas? I have been searching for days and cannot find any example of this issue.