详解centos6和centos7防火墙的关闭

发布时间:2021年11月28日 阅读:947 次

CentOS6.5查看防火墙的状态:

1
[zh@localhost ~]$service iptable status

 CentOS 6.5关闭防火墙

1
2
3
[root@localhost ~]#servcie iptables stop           --临时关闭防火墙
 
[root@localhost ~]#chkconfig iptables off          --永久关闭防火墙

CentOS 7.2关闭防火墙

CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤。

firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)

1
2
3
[root@localhost ~]#firewall-cmd --state
 
not running

 关闭防火墙:

systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动

1
2
3
[root@localhost ~]#systemctl stop firewalld.service
 
[root@localhost ~]#systemctl disable firewalld.service


Tag:
相关文章
发表评论

发表评论: