Docker Community Forums

Share and learn in the Docker community.

Is it possible to block all outgoing connections to a specific port?


I need to make requests from a container to a specific port impossible.

For example, I want to block port 5432 so that I cannot make TCP/UPD requests to *:5432 from my container:

But at the same time, inside the container it would be possible to access the port:

Is it possible?