防火墙相关命令
启动
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

浙公网安备 33010602011771号