firewall
作者:互联网
开启一个端口
firewall-cmd –zone=public –add-port=80/tcp –permanent
重新载入
firewall-cmd –reload
查看
firewall-cmd –zone= public –query-port=80/tcp
删除
firewall-cmd –zone= public –remove-port=80/tcp –permanent
查看已经开放的端口
firewall-cmd –list-ports
重启防火墙服务
systemctl restart firewalld.service
启动防火墙服务
systemctl start firewalld
查看状态
systemctl status firewalld
停止防火墙服务
systemctl stop firewalld
禁用防火墙服务
systemctl diasble firewalld
停止防火墙
firewall systemctl stop firewalld.service
禁止firewall开机启动
firewall systemctl disable firewalld.service
查看服务是否开机启动
systemctl is-enabled firewalld.service
查看已启动的服务列表
systemctl list-unit-files|grep enabled
查看启动失败的服务列表
systemctl –failed
查看版本
firewall-cmd –version
拒绝所有包
firewall-cmd –panic-on
取消拒绝状态
firewall-cmd –panic-off
标签:查看,firewall,cmd,firewalld,防火墙,systemctl 来源: https://www.cnblogs.com/leiuk/p/16434980.html