今天无意中发现一个现象,当我关闭iptables并且停止iptables服务,但是总会有一些出奇的事情发生,当我再次启动系统,查看iptables状态,iptables又自动开启,很是无奈啊!

在Red Hat Enterprise Linux Server release 5.x时代没用出现过关闭iptables时,重启机器之后,防火墙有会打开的的现象,在Red Hat Enterprise Linux Server release 6.2以后就会出现这种情况,经过研究libvirt(虚拟化工具的C函数库)在开机时会带动iptables的启动,如下操作可永久关闭iptables:

 ​​?​


1

2

3

4




​[root@localhost ~]# service iptables stop​

​[root@localhost ~]# chkconfig iptables off​

​[root@localhost ~]# chkconfig libvirtd off​

​[root@localhost ~]# chkconfig |grep libvirtd​

​libvirtd        0:off   1:off   2:off   3:off   4:off   5:off   6:off​