CentOS7操作系统下如何关闭防火墙

centos系统如果不关闭防火墙在使用中会遇到不少问题,而且centos7和centos6关闭防火墙的方式不一样。

centos6:

1.永久性生效,重启后不会复原

开启: chkconfig iptables on

关闭: chkconfig iptables off

2.即时生效,重启后复原

开启: service iptables start

关闭: service iptables stop

  1. 查看防火墙状态

service iptables status

centos7:

1.检查防火墙状态

[root@localhost network-scripts]# systemctl status firewalld.service

CentOS7操作系统下如何关闭防火墙

2.使用命令关闭防火墙:systemctl stop firewalld.service

CentOS7操作系统下如何关闭防火墙

再次查看则防火墙关闭

  1. 第2步只是暂时关闭,如果机器重启则还会自动开启,那么要永久关闭

systemctl disable firewalld.service

© 版权声明
THE END
如果内容对您有所帮助,就支持一下吧!
点赞0 分享
世最幸面包厨的头像 - 鹿快
评论 抢沙发

请登录后发表评论

    暂无评论内容