Patchwork [iptables,next,1/4] extensions: libxt_socket: update man page

mail settings
Submitter Florian Westphal
Date July 14, 2013, 10:29 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/258915/
State Accepted
Delegated to: Florian Westphal
Headers show


Florian Westphal - July 14, 2013, 10:29 p.m.
Document --nowildcard option and its implications when using -m socket
to intercept packets.

While at it, update man page with Balazs Scheidlers comments from
nf_tproxy_core.h in kernel tree to better explain how lookup is performed.

Cc: Eric Dumazet <>
Signed-off-by: Florian Westphal <>
 extensions/ | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)


diff --git a/extensions/ b/extensions/
index 41e8d67..2ef32ce 100644
--- a/extensions/
+++ b/extensions/
@@ -1,5 +1,22 @@ 
-This matches if an open socket can be found by doing a socket lookup on the
+This matches if an open TCP/UDP socket can be found by doing a socket lookup on the
+packet. It matches if there is an established or non\-zero bound listening
+socket (possibly with a non\-local address). The lookup is performed using
+the \fBpacket\fP tuple of TCP/UDP packets, or the original TCP/UDP header
+\fBembedded\fP in an ICMP/ICPMv6 error packet.
 Ignore non-transparent sockets.
+Do not ignore sockets bound to 'any' address.
+The socket match won't accept zero\-bound listeners by default, since
+then local services could intercept traffic that would otherwise be forwarded.
+This option therefore has security implications when used to match traffic being
+forwarded to redirect such packets to local machine with policy routing.
+When using the socket match to implement fully transparent
+proxies bound to non\-local addresses it is recommended to use the \-\-transparent
+option instead.
+Example (assuming packets with mark 1 are delivered locally):
+\-t mangle \-A PREROUTING \-m socket \-\-transparent \-j MARK \-\-set\-mark 1