install firewall-cmd centos 8 code example Example: install firewall-cmd centos 7 sudo yum install firewalld sudo systemctl enable firewalld sudo reboot