.png)
我知道,這個主題有很多問題,但沒有一個對我有幫助。
我跑完之後
sudo iptables -w -t nat -A PREROUTING -s 100.64.0.8 -j CONNMARK --set-mark 25119
我明白了iptables: No chain/target/match by that name.
我正在關注這個答案識別導致錯誤的規則部分。我發現如果我運行sudo iptables -w -t nat -A PREROUTING -s 100.64.0.8
,不會返回任何錯誤。此外,iptables -j CONNMARK -h
返回
...
CONNMARK target options:
--set-xmark value[/ctmask] Zero mask bits and XOR ctmark with value
--save-mark [--ctmask mask] [--nfmask mask]
Copy ctmark to nfmark using masks
--restore-mark [--ctmask mask] [--nfmask mask]
Copy nfmark to ctmark using masks
--set-mark value[/mask] Set conntrack mark value
--save-mark [--mask mask] Save the packet nfmark in the connection
--restore-mark [--mask mask] Restore saved nfmark value
--and-mark value Binary AND the ctmark with bits
--or-mark value Binary OR the ctmark with bits
--xor-mark value Binary XOR the ctmark with bits
表示此擴充已編譯。
我的作業系統是 Windows Subsystem for Linux 2 上的 Ubuntu-16.04,iptables 版本是 1.6.0-2ubuntu3。