iptables: No chaintargetmatch by that name.怎么解决

iptables: No chaintargetmatch by that name.怎么解决,第1张

CentOS6.3 使用 # iptables -I RH-Firewall-1-INPUT 9 -p udp --dport 8080 -j ACCEPT 开启端口时老报:

iptables: No chain/target/match by that name.

解决方法:

改成:iptables -I INPUT 9 -p udp --dport 8080 -j ACCEPT

CentOS6 默认移除了RH-Firewall-1-INPUT,而所有的都在 INPUT 中处理,所以将RH-Firewall-1-INPUT 改成 INPUT 就可以解决问题

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

/sbin/iptables -I OUTPUT -p tcp --dport 6379 -j ACCEPT

  公司有一台Linux服务器,之前开过iptables现在换成其他业务。需要重新编写策略。我把iptables停止。重新编写/etc/sysconfig/iptables。

  重启时报错iptables-restore v1.4.7: iptables-restore: unable to i'itialize table 'filter Error occurred at line: 3 Try `iptables-restore -h' or 'iptables-restore --help' for more information.[失败]

  但是我的第三行是*filter没有其他的。

  可能由于之前的规则没有清空。初始化以下iptables

之后重启iptables

问题解决


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/7994953.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-12
下一篇2023-04-12

发表评论

登录后才能评论

评论列表(0条)

    保存