| 
 首先任意运行一条iptables防火墙规则配置命令如开通80端口: ! V4 {' R" |( S) C0 X6 A' H' ^ 
 iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT % ^& u4 D2 q- x5 Z! q) v 
 然后对iptables服务进行保存: ) T! J; q# K. W5 Q7 u 
 service iptables save   _: `  Q- F7 H3 s# X* ^ 
 如果失败报出:The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl. 6 |  M7 q9 g  O$ l4 F7 | 
 解决方法:) K) M# J) h* F" X 
systemctl stop firewalld 关闭防火墙  
* T0 ~& o6 e  o+ ^" H3 @yum install iptables-services 安装或更新服务
  
- ?' F" k' G8 y再使用systemctl enable iptables 启动iptables
 - w. n7 K* t5 @9 z# b 
最后 systemctl start iptables 打开iptables ! m, M5 E/ _- y- ?4 z3 l 
 再执行service iptables save # ^& \1 v( s# B4 A9 i 
 然后重启iptables服务:  
' p3 x. ^$ l; r: v! {7 ~
 service iptables restart 6 f! J7 M( v- F/ P. j 
 执行完毕之后/etc/syscofig/iptables文件就有了  
" B, g, G: ^! q3 f7 @. y |