Firewalld for Docker Containers
https://github.com/aceberg/my-dockerfiles/tree/main/firewalld
IMPORTANT: --cap-add=NET_ADMIN
needed for this to work!
docker run --name firewalld \
-v $DOCKERDATAPATH/firewalld:/etc/firewalld \
--cap-add=NET_ADMIN \
aceberg/firewalld
Firewall configuration will be saved in /etc/firewalld
docker run --name ubuntu \
--network='container:firewalld' \
ubuntu
Now this ubuntu
container will be using network through firewalld