Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932505AbbGGP33 (ORCPT ); Tue, 7 Jul 2015 11:29:29 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:37238 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932338AbbGGP2J (ORCPT ); Tue, 7 Jul 2015 11:28:09 -0400 MIME-Version: 1.0 In-Reply-To: <1436256473.3809610.317083993.4E2A41A3@webmail.messagingengine.com> References: <21611.1436179798@turing-police.cc.vt.edu> <1436256473.3809610.317083993.4E2A41A3@webmail.messagingengine.com> From: Matteo Croce Date: Tue, 7 Jul 2015 17:27:27 +0200 X-Google-Sender-Auth: AUzWrKNbMkpaRr5sOquOIiIwUjc Message-ID: Subject: Re: [PATCH v2] add stealth mode To: Hannes Frederic Sowa Cc: Valdis Kletnieks , Nicolas Dichtel , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1601 Lines: 41 2015-07-07 10:07 GMT+02:00 Hannes Frederic Sowa : > > > On Mon, Jul 6, 2015, at 21:44, Matteo Croce wrote: >> 2015-07-06 12:49 GMT+02:00 : >> > On Thu, 02 Jul 2015 10:56:01 +0200, Matteo Croce said: >> >> 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. >> > >> > A few notes..... >> > >> > 1) Do you have an actual use case where an iptables '-j DROP' isn't usable? >> >> If you mean using a default DROP policy and allowing only the traffic >> do you want, >> then the use case is where the port can change at runtime and you may not >> want >> to update the firewall every time > > Can't you use socket match in netfilter to accomplish exactly that? You mean the owner --uid match? Yes sort of, but my was a different goal, I want just to disable any kind of reply from a specific interface (usually WAN) unless there is a listening socket, to mitigate port scanning and flood attacks without having a firewall. Obviously you can do it with a firewall, but why do we have /proc/sys/net/ipv4/icmp_echo_ignore_all when we can drop ICMP echoes? -- Matteo Croce OpenWrt Developer -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/