通过防火墙禁止ip访问
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address=" 192.168.1.100" port protocol="tcp" port="3306" reject"
删除规则
firewall-cmd --permanent --remove-rich-rule="rule family="ipv4" source address=" 192.168.1.100" port protocol="tcp" port="3306" reject"
重新载入
firewall-cmd --reload
查看规则
firewall-cmd --list-all
firewall-cmd --zone=public --list-rich-rules