CentOS 7 Firewall

In CentOS 7, use the following commands to add a service to a public zone.

firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --permanent --zone=public --add-port=2812/tcp
firewall-cmd --reload

Leave a Reply

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