debug iptables规则的时候,不要仅仅简单的使用
iptables -L INPUT
虽然自己不喜欢在iptables 的INPUT chain 里面绑定interface,但是还是有很多公司喜欢的
(今天的debug 没有注意到interface,结果白白浪费了一上午时间)
因此一般建议使用
iptables -L INPUT -v --line-numbers
或者更加推荐使用
iptables -nvL INPUT --line-number
-n → Numeric output (prevents DNS resolution, showing raw IPs instead of hostnames).
-v → Verbose output (displays packet counts, byte counts, and interface details).
-L → List rules in the specified chain (INPUT in this case).