From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932364AbbIWR34 (ORCPT ); Wed, 23 Sep 2015 13:29:56 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:36142 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932134AbbIWR3z (ORCPT ); Wed, 23 Sep 2015 13:29:55 -0400 Message-ID: <1443029392.29850.119.camel@edumazet-glaptop2.roam.corp.google.com> Subject: Re: [PATCH v4] add stealth mode From: Eric Dumazet To: Matteo Croce Cc: Florian Westphal , David Miller , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 23 Sep 2015 10:29:52 -0700 In-Reply-To: References: <20150915.120057.1457031142615117336.davem@davemloft.net> <1442397259-28894-1-git-send-email-matteo@openwrt.org> <20150916110629.GP24810@breakpoint.cc> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2015-09-23 at 18:36 +0200, Matteo Croce wrote: > 2015-09-16 13:06 GMT+02:00 Florian Westphal : > > > > Matteo Croce wrote: > > > Add option to disable any reply not related to a listening socket, > > > like RST/ACK for TCP and ICMP Port-Unreachable for UDP. > > > Also disables ICMP replies to echo request and timestamp. > > > The stealth mode can be enabled selectively for a single interface. > > > > I think it would make more sense to extend the socket match > > in xtables if it can't be used to achive this already. > > > > seems like > > *filter > > :INPUT ACCEPT [0:0] > > -A INPUT -p tcp -m socket --nowildcard -j ACCEPT > > -A INPUT -p tcp -j DROP > > COMMIT > > > > Already does what you want for tcp, udp should work too. > > I'd much rather see xtables and/or nftables to be extended > > with whatever feature(s) are needed to configure such a policy > > rather than pushing this into the core network stack. > > The point is to do the filtering without *tables at all, > like /proc/sys/net/ipv4/icmp_echo_ignore_all does for pings Yes, but this adds code in many places, even for people not caring of such protection. The point is : people wanting firewall like protections should instead use netfilter framework.