查看防火墙状态
systemctl status firewalld
启动防火墙
systemctl start firewalld
停止某项服务,这里举例停止防火墙
systemctl stop firewalld
查看防火墙已经开放的端口
firewall-cmd --list-port
添加开放指定防火墙
firewall-cmd --zone=public --add-port=这里是需要开启的端口号/tcp --permanent
重新加载防火墙
firewall-cmd --reload
标签:systemctl,CentOS,--,cmd,端口,防火墙,firewall,复制
From: https://www.cnblogs.com/guarderming/p/17406670.html