在防火墙添加规则后我是这样改的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  ]

相关文章:

  • 2022-12-23
  • 2021-09-01
  • 2021-11-02
  • 2021-10-23
  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-31
  • 2022-01-08
  • 2022-01-07
  • 2021-11-12
  • 2021-05-22
  • 2022-12-23
  • 2021-06-12
相关资源
相似解决方案