Docker and iptables persistence

Dowload our template iptables rules

wget -O /root/firewall.sh https://raw.githubusercontent.com/entermedia-community/entermediadb-docker/master/scripts/firewall.sh && chmod +x /root/firewall.sh

Create your own iptables unix service

sudo vi /etc/systemd/system/org.entermediadb-firewall.service
[Unit]
Description=dam.entermediadb.org Firewall Config
After=docker.service
After=nginx.service
After=firewalld.service

[Service]
Type=oneshot
ExecStart=/root/firewall.sh

[Install]
WantedBy=multi-user.target

Set the enable boolean to have the service be part of your machine's OS boot sequence

systemctl enable --now org.entermediadb-firewall.service

*** Tested on CentOS/RHEL 7.6 && iptables v1.4.21 ***