在防火墙添加规则后我是这样改的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 ]
原文地址:http://wangxiaoyong.blog.51cto.com/2289427/1650441