发布时间:2026-07-21阅读(1)
centos系统如果不关闭防火墙在使用中会遇到不少问题,而且centos7和centos6关闭防火墙的方式不一样。
centos6:
1.永久性生效,重启后不会复原
开启: chkconfig iptables on
关闭: chkconfig iptables off
2.即时生效,重启后复原
开启: service iptables start
关闭: service iptables stop
service iptables status
centos7:
1.检查防火墙状态
[root@localhost network-scripts]# systemctl status firewalld.service

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

再次查看则防火墙关闭
systemctl disable firewalld.service
Copyright © 2024 有趣生活 All Rights Reserve吉ICP备19000289号-5 TXT地图HTML地图XML地图