Configure the Firewall
Enable and start firewalld
CODEsystemctl enable firewalld systemctl start firewalld
Allow SSH (22)
CODEfirewall-cmd --zone=public --add-service=ssh --permanent
Allow http (80)
CODEfirewall-cmd --zone=public --add-service=http --permanent
Allow https (443)
CODEfirewall-cmd --zone=public --add-service=https --permanent
Allow smtp (25)
CODEfirewall-cmd --zone=public --add-service=smtp --permanent
Optionally allow MySQL
CODEfirewall-cmd --zone=public --add-port=3306/tcp --permanent
Reload the firewall configuration
CODEfirewall-cmd --reload