spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.73k stars 1.01k forks source link

Add ufw / ufw-docker / ufw-docker-automated support #2653

Open VanHogan opened 1 year ago

VanHogan commented 1 year ago

For the background: ufw and docker in conjunction is by default not very safe. See this: https://github.com/chaifeng/ufw-docker#problem The sulution is ufw-docker command. Setting up fw rules for the docker containers the playbook creates is a thing i'm frustrated of. Addtionally if the exposed ports of the conatinser might change at some point..... well then i have to first find this and then again need to change it. There is a solution for automatic ufw-docker maintenance.... it is called ufw-docker-automated. See here: https://github.com/shinebayar-g/ufw-docker-automated

Describe the solution you'd like Would it be possible to build a role that is setting up the firewall rules for the created containers?

Describe alternatives you've considered Manual adjustment of firewll rules

altsalt commented 1 year ago

Related to #1423

rltas commented 1 year ago

https://github.com/shinebayar-g/ufw-docker-automated#installation This requires direct modification of a system wide configuration with potentially conflicting contents, how would the playbook automatically handle that?