From nobody Thu Jun 13 13:34:21 2024 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0NgQ25kSz5Ngvg for ; Thu, 13 Jun 2024 13:34:42 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (pdx.rh.CN85.dnsmgr.net [65.75.216.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0NgP5VhRz46k2; Thu, 13 Jun 2024 13:34:41 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Authentication-Results: mx1.freebsd.org; none Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 45DDYLQ1044762; Thu, 13 Jun 2024 06:34:21 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 45DDYLg5044761; Thu, 13 Jun 2024 06:34:21 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202406131334.45DDYLg5044761@gndrsh.dnsmgr.net> Subject: Re: Discarding inbound ICMP REDIRECT by default In-Reply-To: <7628aa81fb381a08cbb1c2fabf6bc493@bsdforge.com> To: Chris Date: Thu, 13 Jun 2024 06:34:21 -0700 (PDT) CC: "Rodney W. Grimes" , Ed Maste , freebsd-net@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:10494, ipnet:65.75.216.0/23, country:US] X-Rspamd-Queue-Id: 4W0NgP5VhRz46k2 > On 2024-06-12 15:05, Chris wrote: > > On 2024-06-12 14:47, Rodney W. Grimes wrote: > >>> I propose that we start dropping inbound ICMP REDIRECTs by default, by > >>> setting the net.inet.icmp.drop_redirect sysctl to 1 by default (and > >>> changing the associated rc.conf machinery). I've opened a Phabricator > >>> review at https://reviews.freebsd.org/D45102. > >> > >> I propse that we NOT do this. If you need this to protect your end > >> node your probably doing something really unsafe network wise. The > >> place that ICMP REDIRECTS should be dropped, and is most places, is > >> at access routers and firewalls. > >> > >> Any one that needs this change to protect there network has larger > >> issues than an ICMP REDIECT causing some issues. > >> > >> ICMP redirectr are very usefull for not having to run routing > >> protocols on all your end nodes and allowing your edge/access > >> routers tell your internal hosts via redirects how to get to > >> places more efficiently. > >> > >>> > >>> ICMP REDIRECTs served a useful purpose in earlier networks, but on > >> They still serve this very usefull purpose. > >> > >>> balance are more likely to represent a security issue today than to > >>> provide a routing benefit. With the change in review it is of course > >>> still possible to enable them if desired for a given installation. > >>> This change would appear in FreeBSD 15.0 and would not be MFC'd. > >>> > >>> One question raised in the review is about switching the default to > >>> YES but keeping the special handling for "auto" (dropping ICMP > >>> REDIRECT if a routing daemon is in use, honouring them if not). I > >>> don't think this is particularly valuable given that auto was > >>> introduced to override the default NO when necessary; there's no need > >>> for it with the default being YES. That functionality could be > >>> maintained if there is a compelling use case, though. > >> > >> The policy that is there now is exactly how things should be configured > >> for a host in a network protected by a proper router w/firewall. > >> The existing "auto" does exactly the right thing. > >> > >>> > >>> If you have any questions or feedback please follow up here or in the > >>> review. > > As Rodeney already effectively explains; dropping packets makes routing, > > and discovery exceedingly difficult. Which is NOT what the average user > > wants, > > or expects. I use "set block-policy drop" in pf(4). But as already noted, > > this is for "filtering" purposes. Your suggestion also has the negative > > affect > > of hanging remote ports. Which can result in other negative results by > > peers. > > > > Please don't. :) > >>> > >>> > > --Chris > OK, now having actually read the (phab) review. I'm of the opposite opinion. > Your review seems to make the right decision. :) You do get that the final effect of the change is that by default ALL freeBSD boxes well be dropping ICMP REDIRECTS, both routers and end nodes. I know first hand that this change WOULD break my network(s) in locations that have more than 1 router as all of the interior hosts simply depend on an ICMP redirect to get them using the optimal router after they wrongly use the default router for a packet. A quick check on Ubunty 22.04 and Debian 12 indicate these are stlll accepted by default on those systems. Again, this is gona be one of those "bite someone in the ass" and your actually not providing any real security to anyone by making this change. If this is such a security issue, how come FREEFALL.freebsd.org still has: net.inet.icmp.drop_redirect: 0 Because it does not need to do that, because it is properly protected by routers and firewalls that do the dropping for them. DOG food Dog FOOD DOG FOOD!!! -- Rod Grimes rgrimes@freebsd.org