Basic firewall-cmd commands

Basic firewall-cmd commands

For reference, these are some of the most used firewall-cmd I use on CentOS 7.

firewall-cmd --list-all-zones

firewall-cmd --zone=internal --change-interface=eth1

firewall-cmd --zone=internal --add-port=80/tcp --permanent
firewall-cmd --zone=internal --add-protocol=vrrp --permanent

firewall-cmd --reload

firewall-cmd --list-ports --zone=internal
firewall-cmd --list-proto --zone=internal

For a complete list got to the official documentation.


Leave a Reply