在/etc/sysconfig下找不到iptables文件,执行下列命令后,可以将防火墙策略保存到iptables文件中去。
[root@memcache ~]# iptables -P OUTPUT ACCEPT
[root@memcache ~]# service iptables save
将当前规则保存到 /etc/sysconfig/iptables: [确定]
[root@memcache ~]# cat /etc/sysconfig/iptables
# Generated by iptables-save v1.3.5 on Sat Jun 14 15:05:34 2014
*filter
:INPUT ACCEPT [5:320]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [5:556]
COMMIT
# Completed on Sat Jun 14 15:05:34 2014
阅读(1566) | 评论(0) | 转发(0) |