rs_filter/iptables
2024-03-11 19:28:06 +08:00

12 lines
462 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 所有tcp连接已经标记直接return
iptables -t mangle -A PREROUTING -m connmark --mark 2 -j RETURN
// 进入队列
iptables -t mangel -A PREROUTING -p tcp --dport {}:{} -m conntrack --ctstate NEW -j NFQUEUE --queue-bypass --queue-num 1
// 所有fwmark标记为1的标记为2
iptables -t mangle -A PREROUTING -m mark --mark 0x1 -j CONNMARK --set-mark 0x2
iptables -t mangle -A PREROUTING -m mark --mark 3 -j LOG --log-prefix "FWMark 3 Packet: "