linux – 错误:iptables:没有链/目标/匹配该名称

前端之家收集整理的这篇文章主要介绍了linux – 错误:iptables:没有链/目标/匹配该名称前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
参见英文答案 > Can’t resolve issue: iptables: No chain/target/match by that name3个
我正在尝试使用Squid和iptables在RHEL Server 6.5上配置代理服务器.下面是我执行的命令及其显示错误消息:
  1. vzlptest01 root [root] > iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
  2. iptables: No chain/target/match by that name.

更多细节:

  1. vzlptest01 root [root] > cat /proc/net/ip_tables_matches
  2. limit
  3. state
  4. length
  5. ttl
  6. tcpmss
  7. multiport
  8. multiport
  9. tos
  10. tos
  11. dscp
  12. icmp
  13. udplite
  14. udp
  15. tcp
  16.  
  17. vzlptest01 root [root] > cat /proc/net/ip_tables_targets
  18. DNAT
  19. SNAT
  20. LOG
  21. TOS
  22. TOS
  23. DSCP
  24. TCPMSS
  25. REJECT
  26. ERROR

如何处理这个问题?

解决方法

看起来你没有INPUT表.您可以尝试使用它创建它
  1. iptables -N INPUT

如果这不起作用,我会看看正在使用的虚拟化技术,并与托管服务提供商讨论它.

作为旁白

  1. iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT

你几乎肯定不想用-A这样做,我几乎在所有情况下都会好得多.

猜你在找的Linux相关文章