From owner-freebsd-current@FreeBSD.ORG Fri Sep 23 09:22:28 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48B7016A41F for ; Fri, 23 Sep 2005 09:22:28 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from leto.uk.clara.net (leto.uk.clara.net [80.168.69.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC48043D49 for ; Fri, 23 Sep 2005 09:22:27 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from bloodhound.noc.clara.net ([195.8.70.207]) by leto.uk.clara.net with esmtp (Exim 4.43) id 1EIjlC-000FDv-Ru; Fri, 23 Sep 2005 10:22:26 +0100 Received: from personal by bloodhound.noc.clara.net with local (Exim 4.52 (FreeBSD)) id 1EIjlH-000Oj4-PV; Fri, 23 Sep 2005 10:22:31 +0100 Date: Fri, 23 Sep 2005 10:22:31 +0100 From: Brian Candler To: Jeremie Le Hen Message-ID: <20050923092231.GF94511@uk.tiscali.com> References: <20050922122113.GO24643@obiwan.tataz.chchile.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050922122113.GO24643@obiwan.tataz.chchile.org> User-Agent: Mutt/1.4.2.1i Cc: freebsd-current@FreeBSD.org Subject: Re: jail's periodic stuff X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2005 09:22:28 -0000 On Thu, Sep 22, 2005 at 02:21:13PM +0200, Jeremie Le Hen wrote: > there are some periodic script which shouldn't be run inside a jail, > because jail's restrictions would prevent the utility to work correctly. > This includes those that gathers statistics from various firewalls, > in security/ : > 510.ipfdenied > 520.pfdenied > 550.ipfwlimit > 600.ip6fwdenied > 610.ipf6denied > 650.ip6fwlimit ... > I would like to hear your comments on this and on the best way to solve > this problem. My first thought was to add > > % if [ `sysctl -n security.jail.jailed` -eq 1 ] > % then > % exit 0 > % fi > > just before the main case statement, but there may be smarter ways to > achieve this. A mechanism which already exists is to create /etc/periodic.conf within your jail, disabling the individual scripts you don't want to run. See /etc/defaults/periodic.conf for the settings available (or /usr/share/examples/etc/defaults/periodic.conf) However it might be a good idea for FreeBSD to provide a sample periodic.conf for use in a jail environment. Regards, Brian.