I would like to use UFW so I can make my server more secure, because, as you know, docker is opening to the whole world every port that I map from my containers to the host. Everything looks good but, when I try to connect from my computer (163.116.169.113) to the port 27017, the connection gets blocked.
Do you think there is a problem with my docker network? maybe it should be bridge?
Hi there,
I have followed your instructions, but I can't manage to make UFW take any effect on the ports.
Here you can see my
docker-compose.yml
file content:Here is the result of
sudo iptables -S
:And finally, here you can see how my docker services are actually listening properly (
sudo netstat -ntlp | grep LISTEN
):I would like to use UFW so I can make my server more secure, because, as you know, docker is opening to the whole world every port that I map from my containers to the host. Everything looks good but, when I try to connect from my computer (163.116.169.113) to the port 27017, the connection gets blocked.
Do you think there is a problem with my docker network? maybe it should be bridge?