How to make firewall changes permanent via firewall-cmd?

on January 4th, 2017 by Hades | No Comments »

If you’re trying to adding a firewall rule by iptables (lol) in the Centos 7 where is a new firewall instead of firewall-cmd it will not work after reboot or restart service firewalld.

Use equivalent zone command:

sudo firewall-cmd --zone=public --add-port=1167/tcp --permanent

and to check the result:

sudo firewall-cmd --zone=public --list-all

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.