Centos7防火墙开放端口
查看已开放的端口
firewall-cmd --list-ports
开放端口(重启防火墙后生效)
firewall-cmd --zone=public --add-port=3306/tcp --permanent
关闭端口(重启防火墙后生效)
firewall-cmd --zone=public --remove-port=3306/tcp --permanent
重启防火墙
firewall-cmd --reload
开启防火墙
systemctl start firewalld
关闭防火墙
systemctl stop firewalld
开机启动防火墙
systemctl enable firewalld
禁止防火墙开机启动
systemctl disable firewalld