文章目录
Linux Shell CentOS 查看Linux 防火墙 相关信息1、代码2、结果
Linux Shell CentOS 查看Linux 防火墙 相关信息
1、代码
prt
"当前防火墙状态 "
systemctl status firewalld.service
| grep "Active: active (running)"
systemctl status firewalld.service
| grep "Active: active (running)" && prt
"防火墙处于开启状态" || prt
"防火墙处于关闭状态"
systemctl status firewalld.service
| grep "Active: active (running)" && prt
"已开启的端口有" && firewall-cmd --zone
=public --list-ports
2、结果
简简单单OnlineZuozuo
认证博客专家
Spring
架构
分布式
未闻万里蓬莱,而窥先圣遗智。故,以此生筑梦,奔而逐之;以泰山之伟,攀而登之;以静雅素心,处世为人。------zuozuo著