002-Linux下防火墙相关命令操做

  linux的各个版本或同一个版本间不一样版本号关于防火墙命令也会有不同的。针对这些命令整理以下,方便本身或有须要的朋友查阅。linux

centOS 6.5关闭防火墙步骤
关闭命令:         service iptables stop  
永久关闭防火墙:chkconfig iptables off
 
两个命令同时运行,运行完成后查看防火墙关闭状态  
        service iptables status
 

centos7.0默认防火墙为firewalld(为了测试,关闭默认防火墙,使用iptables防火墙)centos

systemctl stop firewalld.service #中止firewall测试

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

查看默认防火墙状态:spa

firewall-cmd --stateip

not runningcmd

相关文章
相关标签/搜索