Answer the question
In order to leave comments, you need to log in
Why doesn't UFW close ports that are open with docker/docker-compose?
I have an application that uses docker-compose as well as a VPS.
I raised all the services, and decided to check the firewall for one thing.
In UFW, I blocked all ports except 22/SSH and 80/http.
I go to port 80 - everything works I
go to port 4200 (I have Backend on it, and NGINX proxies there) - for some reason it skips.
I read about it on all sorts of overflow stacks, but they write answers specifically about docker, without composition, and in other things, I tried to execute those commands and as a result my containers simply lost access to the Internet.
Answer the question
In order to leave comments, you need to log in
because ufw is an add-on over iptables
and it is limited by the ufw-*
chains allocated for it in iptables
, and the docker daemon has its own DOCKER-* chains,
and ufw can manipulate its chains, and the docker daemon with its iptables-save
command will show everything chains and rules
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question