Skip to content

Commit aa75876

Browse files
Red54ummakynes
authored andcommitted
docs: tproxy: ignore non-transparent sockets in iptables
The iptables example was added in commit d2f2603 (netfilter: Add documentation for tproxy, 2008-10-08), but xt_socket 'transparent' option was added in commit a31e1ff (netfilter: xt_socket: added new revision of the 'socket' match supporting flags, 2009-06-09). Now add the 'transparent' option to the iptables example to ignore non-transparent sockets, which is also consistent with the nft example. Signed-off-by: 谢致邦 (XIE Zhibang) <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 2cadd3b commit aa75876

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Documentation/networking/tproxy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The idea is that you identify packets with destination address matching a local
1717
socket on your box, set the packet mark to a certain value::
1818

1919
# iptables -t mangle -N DIVERT
20-
# iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT
20+
# iptables -t mangle -A PREROUTING -p tcp -m socket --transparent -j DIVERT
2121
# iptables -t mangle -A DIVERT -j MARK --set-mark 1
2222
# iptables -t mangle -A DIVERT -j ACCEPT
2323

0 commit comments

Comments
 (0)