Trying : iptables -A syns -m state –state NEW -i ! $EXT_IF -j ACCEPT
Shows up Error Message :
Using intrapositioned negation (`–option ! this`) is deprecated in favor of extrapositioned (`! –option this`).
雖然報錯了但是命令執行了,錯誤的原因就是 -i ! XXX 導致的,新版本的 iptables命令需要我們將 !放到 -i 的前面,只要改成如下即可。
iptables -A syns -m state –state NEW ! -i $EXT_IF -j ACCEPT
转自:http://blog.almx.cc/2017/03/536#more-536