From owner-freebsd-hackers Sun Mar 16 16:57:26 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0558437B401 for ; Sun, 16 Mar 2003 16:57:24 -0800 (PST) Received: from puck.nether.net (puck.nether.net [204.42.254.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED89443FA3 for ; Sun, 16 Mar 2003 16:57:22 -0800 (PST) (envelope-from jared@puck.nether.net) Received: (from jared@localhost) by puck.nether.net (8.12.8/8.12.6) id h2H0uf7N009886; Sun, 16 Mar 2003 19:56:41 -0500 Date: Sun, 16 Mar 2003 19:56:41 -0500 From: Jared Mauch To: Mooneer Salem Cc: Jared Mauch , freebsd-hackers@freebsd.org Subject: Re: jail support for ping, traceroute, etc.. crude hack Message-ID: <20030317005641.GA8288@puck.nether.net> References: <20030316211400.GE32478@puck.nether.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.3i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Mar 16, 2003 at 02:30:36PM -0800, Mooneer Salem wrote: > Hello, > > This patch is interesting. To my understanding though, ipfw uses RAW sockets > to communicate with the kernel. Therefore, it might be possible to edit the > ipfw table from within the jail, which may be a bad thing. Just a thought. At least in this environment I do not expect to be using IPFW, but this could be something to watch out for in other environments.. When i was looking at this i was somewhat frustated with the way suser() doesn't really allow any sort of a context-of-check to happen easily that i was able to find. ie, was it for a networking check, filesystem, etc.. so my first stab at this ended up with every user being able to do raw ip packets which was bad.. i ended up doing the p->p_prison save hack instead to get the result then applied the prison policy there. Something that i would have no idea where to start on but am interested in doing is also extending the jail support to include IPv6 in addition to the IPv4 sockets but that can cause some issues in an eui-64 environment.. personally i dislike eui-64 as if you change the ethernet card (which i tend to swap out periodically as i need to take a card out of my desktop to match up with dual-nic cards in other machines) it renumbers you. - jared > -----Original Message----- > From: owner-freebsd-hackers@FreeBSD.ORG > [mailto:owner-freebsd-hackers@FreeBSD.ORG]On Behalf Of Jared Mauch > Sent: Sunday, March 16, 2003 1:14 PM > To: freebsd-hackers@freebsd.org > Subject: jail support for ping, traceroute, etc.. crude hack > > > > so, i am working on building a "super-server" for me > and several friends to collaborate with on the money front > to put our machine in a colo location, etc.. and still have good > access to networking resources. > > as a result, i needed to modify the FreeBSD kernel such > that it will allow us to use ping, traceroute and other tools. > > obviously we know there will be some underlying security > issues associated but we are sophisticated to understand the > nature of these and they are an 'acceptable' situation. > > my diffs are available at > > http://puck.nether.net/~jared/fbsd-4.8-rc1-diff-jail-raw_ip.txt > and are against the 4.8-rc1 /usr/src/sys tree > > yeah, they're crude but it gets the desired job done. there > is a sysctl to control it, so if its not the desired operation > it can be easily tweaked. > > send me comments. > > enjoy, > > - jared > > -- > Jared Mauch | pgp key available via finger from jared@puck.nether.net > clue++; | http://puck.nether.net/~jared/ My statements are only mine. > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > > > > -- Jared Mauch | pgp key available via finger from jared@puck.nether.net clue++; | http://puck.nether.net/~jared/ My statements are only mine. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message