centos7开启防火墙和指定端口 1、开启防火墙 首先查看防火墙状态: firewall-cmd --state 开启防火墙 systemctl start firewalld.service 设置开机自启: systemctl enable firewalld.service 重启防火墙: systemctl restart firewalld.service 检查防火墙状态是否打开: firewall-cmd --state 查看防火墙设置开机自启是否成功: systemctl is-enabled fire…