# Centos 7 - Docker and FirewallD

**URL:** <https://meta.discourse.org/t/centos-7-docker-and-firewalld/32045>\
**Category:** Self-hosting\
**Tags:** docker, email\
**Created:** [13 באוגוסט,‏ 2015,‏ 12:29am UTC](https://meta.discourse.org/t/centos-7-docker-and-firewalld/32045 "2015-08-13T00:29:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**Post date:** [13 באוגוסט,‏ 2015,‏ 12:43am UTC](https://meta.discourse.org/t/centos-7-docker-and-firewalld/32045/2 "2015-08-13T00:43:00Z")

</div>

FirewallD is awesome 🙂

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

```plaintext
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! 🙂

---

_[View the full topic](https://meta.discourse.org/t/centos-7-docker-and-firewalld/32045)._
