From owner-freebsd-stable Mon Sep 24 3:23:19 2001 Delivered-To: freebsd-stable@freebsd.org Received: from buffoon.automagic.org (buffoon.automagic.org [208.185.30.208]) by hub.freebsd.org (Postfix) with SMTP id CA58D37B403 for ; Mon, 24 Sep 2001 03:23:16 -0700 (PDT) Received: (qmail 35220 invoked by uid 1000); 24 Sep 2001 10:23:01 -0000 Date: Mon, 24 Sep 2001 06:23:01 -0400 From: Joe Abley To: Andrew Reilly Cc: Juha Saarinen , freebsd-stable@FreeBSD.ORG Subject: Re: 127/8 continued Message-ID: <20010924062300.H4205@buffoon.automagic.org> References: <00ca01c144ae$53440710$0a01a8c0@den2> <20010924001714.Y4205@buffoon.automagic.org> <20010924160936.A10863@gurney.reilly.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010924160936.A10863@gurney.reilly.home> User-Agent: Mutt/1.3.22.1i Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Sep 24, 2001 at 04:09:36PM +1000, Andrew Reilly wrote: > On Mon, Sep 24, 2001 at 12:17:14AM -0400, Joe Abley wrote: > > On Mon, Sep 24, 2001 at 04:06:45PM +1200, Juha Saarinen wrote: > > > Misunderstood what Lamont was trying to show earlier... but he's right: > > > FreeBSD sends 127/8 out on the 'Net: > > > > I don't think FreeBSD is non-compliant for sending packets with > > destination 127/8 out onto the net, but I guess it could make it > > harder for users to send packets with moronic destinations out. > > > > --- rc.network.orig Mon Sep 24 00:08:17 2001 > > +++ rc.network Mon Sep 24 00:14:05 2001 > > @@ -346,6 +346,13 @@ > > done > > fi > > > > + # Add a blackhole static route for 127/8, since packets with > > + # that destination should be caged up and starved > > + lo0_inet=$(ifconfig lo0 | awk '($1 == "inet") { print $2; exit; }') > > + if [ -n "${lo0_inet}" ]; then > > + route add 127.0.0.0 -netmask 255.0.0.0 ${lo0_inet} -blackhole > > + fi > > + > > echo -n 'Additional routing options:' > > case ${tcp_extensions} in > > [Yy][Ee][Ss] | '') > > Why -blackhole? > > Those packets are _supposed_ to get back to this host. That's > what loopback is for. The packets are not supposed to go out on the network. If you wanted them to be handled as if their destination address was local, you would configure a corresponding local address. > I've been using this in /etc/rc.local for a long time: > > echo -n ', fixing localhost net route' > route add -net 127. -netmask 255.0.0.0 -iface lo0 > > Can't remember when I started. Basically as soon as I > discovered that the wrong thing was happening. Ah, -iface lo0 is nicer than my lump of awk. Joe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message