UFW behaviour with Docker networks

175 Views Asked by At

I have Ubuntu machine on which I have Nginx listening on 443. I have multiple dockers exposing ports as "127.0.0.1:8003:8110", "127.0.0.1:8082:8111". On the host machine where I have Nginx, I do proxy to these applications on docker. Everything works fine till this point, as soon as I enable UFW and make ufw default deny outgoing, I am not able to access any of the applications on docker via the proxy. When I do ufw allow out 8110 , allowing outbound traffic to internal port of docker application, I'm able to access them. What I dont understand is , how does UFW work with Docker networks. What is the recommended way to expose such applications via Proxy to the outside world.

0

There are 0 best solutions below