I am fairly new to Centos/Linux and have been trying to configure my firewall to restrict access to mysql and ssh for only a few IP addresses. When I run the following and do a port scan I do see that all ports are shut, however when I run firewall-cmd --reload port 22 opens again. How can I restrict it by default or do I not need to run the reload? What would happen if the server restarted? Thanks.
firewall-cmd --permanent --zone=trusted --add-source=IP1/24
firewall-cmd --permanent --zone=trusted --add-source=IP2/24
firewall-cmd --permanent --zone=trusted --add-service=mysql
firewall-cmd --permanent --zone=trusted --add-service=ssh
firewall-cmd --list-services --zone=trusted
firewall-cmd --zone=public --remove-service=ssh