CentOS6/7查看和关闭防火墙

旧城冷巷雨未停 提交于 2020-02-17 17:21:38

vi /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled

centos 6

service iptable status
servcie iptables stop                    --临时关闭防火墙
chkconfig iptables off                    --永久关闭防火墙

centos 7

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

启动一个服务:
systemctl start firewalld.service

关闭一个服务:
systemctl stop firewalld.service

重启一个服务:
systemctl restart firewalld.service

显示一个服务的状态:
systemctl status firewalld.service

在开机时启用一个服务:
systemctl enable firewalld.service

在开机时禁用一个服务:
systemctl disable firewalld.service

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!