我有以下的Iptables版本:
sh# iptables --version
iptables v1.4.21“帮助”页包含以下一行:
--check -C chain Check for the existence of a rule我在iptables-save中有这样一条规则:
-A PREROUTING -p udp -m udp --dport 5060 -j CT --helper sip但是,当我试图检查(-C)时,我看到了这样的输出:
sh# iptables -C PREROUTING -p udp -m udp --dport 5060 -j CT --helper sip
iptables: Bad rule (does a matching rule exist in that chain?).原因何在?有什么窃听器在Iptables里吗?
发布于 2021-11-09 19:04:43
尝试添加一个-t nat,以便选择NAT表,或者-t mangle。非常肯定的是,它将默认地查看filter表,它不会有PREROUTING链。您需要指定正在查看的表。
sh# iptables -C PREROUTING -t nat -p udp -m udp --dport 5060 -j CT --helper siphttps://serverfault.com/questions/1083046
复制相似问题