启动
shell> systemctl start firewalld
停止
shell> systemctl stop firewalld
重启
shell> systemctl restart firewalld
允许开机自启
shell> systemctl enable firewalld
不允许自启
shell> systemctl disable firewalld
查看状态
firewall-cmd --state
查看开放端口
shell> firewall-cmd --list-ports
添加端口
shell> firewall-cmd --add-port=8080/tcp --permanent
删除端口
shell> firewall-cmd --remove-port=8080/tcp --permanent
重新加载
shell> firewall-cmd --reload
标签:shell,--,cmd,防火墙,firewalld,命令,systemctl,相关,firewall
From: https://www.cnblogs.com/xiaoovo/p/17059678.html