Linux6.x和Linux7.x关闭防火墙iptables命令区别

版权声明:如有问题可以加入QQ群:805652065,互相学习讨论 https://blog.csdn.net/zhangmingcai/article/details/82977103

Linux7.x系统关闭防火墙iptables命令如下:

查看防火墙的状态:firewall-cmd --state或者使用iptables -L

关闭防火墙:systemctl stop firewalld.service,但是开机之后还会启动防火墙

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

查看防火墙配置:cat /etc/sysconfig/iptables-config

Linux6.x系统关闭防火墙iptables命令如下:

查看防火墙的状态:service iptables status 或者使用iptables -L

关闭防火墙:service iptables stop ,但是开机之后还会启动防火墙

chkconfig  iptables  off   #禁止firewall开机启动

查看防火墙配置:cat /etc/sysconfig/iptables

备注说明:

1. iptables在Linux6和7系统,开启或者关闭命令和配置文件名都发生变化

2. ipv6的防火墙,将对应的命令进行修改比如,将iptables改成ip6tables就是开启或者关闭ipv6的防火墙

猜你喜欢

转载自blog.csdn.net/zhangmingcai/article/details/82977103
今日推荐