为什么从零开始安装iptable或升级iptable
然后从chkconfig显示的iptables开始?
如何避免在安装/升级后打开chkconfig iptable?
真实的例子来自我的红帽子机器版本6。
service iptables status
Firewall is stopped.
# chkconfig --list | grep iptables
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off
# chkconfig iptables off
# chkconfig --list | grep iptables
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
yum remove iptables
.
.
.
chkconfig --list | grep iptables
show nothing ( as should be )
yum install iptables
.
.
.在成功安装iptables之后,我们可以看到chkconfig是开着的--为什么?
# chkconfig --list | grep iptables
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off这方面的关键问题是:
重新启动iptables服务后的
安装iptables软件包后,请建议如何避免iptables chkconfig。
发布于 2016-09-20 13:03:52
您关于为什么启用iptables服务的问题很容易回答:
rpm -q --scripts iptables
...
postinstall scriptlet (using /bin/sh):
/sbin/ldconfig
/sbin/chkconfig --add iptablesRPM包中包含的postinstall脚本调用chkconfig来启用服务。
Yum没有提供不运行postinstall脚本的选项,但是rpm提供了,在手动安装它之前下载rpm。
yumdownloader iptables
rpm -i --noscripts iptables.x86_64.x.y-z.rpm发布于 2016-09-20 14:46:59
如果您无法控制RPM保持重新启用服务的行为,则应该配置iptables以满足您的需要。
最简单的方法是对/etc/sysconfig/iptables中的任何行进行注释。这将不会加载任何规则,应该等于不运行。
仅仅移动或删除它将不是解决方案,因为该文件将由iptables-services在更新或重新安装时安装。
https://serverfault.com/questions/804209
复制相似问题