Centos 7 - Docker and FirewallD

FirewallD is awesome :slight_smile:

Run firewall-cmd --get-services to get a list of services, then simply add the ones you want, such as:

firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --permanent --add-service=pop3s
firewall-cmd --permanent --add-service=smtp

List your services with firewall-cmd --permanent --list-services

Then restart with systemctl restart firewalld and check everything is working on your server, then systemctl enable firewalld to enable and start the firewall on reboot.

Then restart docker with systemctl restart docker and if you ever restart the firewall, you need to restart docker.

It’s so easy I love it! :slight_smile: