1、查看防火墙状态
firewall-cmd --state
[root@node03 ~]# firewall-cmd --state
not running
2、防火墙服务
systemctl status firewalld
[root@node03 ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
3、启动、停止、重启服务
service firewalld start
service firewalld stop
service firewalld restart
4、查看规则
firewall-cmd --list-all
5、开放端口
firewall-cmd --permanent --add-port=8080/tcp
firewall-cmd --reload
firewall-cmd --query-port=80/tcp
firewall-cmd --permanent --remove-port=8080/tcp
6、禁止开机启动
systemctl disable firewalld
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)