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