首页 > 其他 > 详细

修改iptables后重启返回错误

时间:2015-05-12 11:45:12      阅读:2041      评论:0      收藏:0      [点我收藏+]

在防火墙添加规则后我是这样改的vi /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT

重启:/etc/init.d/iptables restart

返回值:Error occurred at line: 16
Try `iptables-restore -h‘ or ‘iptables-restore --help‘ for more information.
[FAILED]

找到解决方法:

/sbin/iptables -I INPUT -p tcp --dport 21 -j ACCEPT

/etc/rc.d/init.d/iptables save

/etc/init.d/iptables restart

重启成功:iptables: Setting chains to policy ACCEPT: filter [  OK  ]
iptables: Flushing firewall rules: [  OK  ]
iptables: Unloading modules: [  OK  ]
iptables: Applying firewall rules: [  OK  ]

修改iptables后重启返回错误

原文:http://wangxiaoyong.blog.51cto.com/2289427/1650441

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!