From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [PATCH iptables] xt_socket: add --nowildcard flag Date: Tue, 25 Jun 2013 02:58:05 +0200 Message-ID: <20130625005805.GB3437@localhost> References: <1370300249.24311.190.camel@edumazet-glaptop> <1371732755.3252.409.camel@edumazet-glaptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev , netfilter-devel@vger.kernel.org, Jesper Dangaard Brouer , Patrick McHardy To: Eric Dumazet Return-path: Received: from mail.us.es ([193.147.175.20]:55888 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752437Ab3FYA6J (ORCPT ); Mon, 24 Jun 2013 20:58:09 -0400 Content-Disposition: inline In-Reply-To: <1371732755.3252.409.camel@edumazet-glaptop> Sender: netfilter-devel-owner@vger.kernel.org List-ID: On Thu, Jun 20, 2013 at 05:52:35AM -0700, Eric Dumazet wrote: > From: Eric Dumazet > > xt_socket module can be a nice replacement to conntrack module > in some cases (SYN filtering for example) > > But it lacks the ability to match the 3rd packet of TCP > handshake (ACK coming from the client). > > Add a XT_SOCKET_NOWILDCARD flag to disable the wildcard mechanism > > The wildcard is the legacy socket match behavior, that ignores > LISTEN sockets bound to INADDR_ANY (or ipv6 equivalent) > > iptables -I INPUT -p tcp --syn -j SYN_CHAIN > iptables -I INPUT -m socket -j ACCEPT I have enqueued this patch to iptables-next, thanks!