From owner-freebsd-jail@FreeBSD.ORG Fri Jun 29 08:25:56 2007 Return-Path: X-Original-To: freebsd-jail@freebsd.org Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BB3E416A400 for ; Fri, 29 Jun 2007 08:25:56 +0000 (UTC) (envelope-from roger@gujord.com) Received: from red.newsgrip.com (red.newsgrip.com [193.69.188.102]) by mx1.freebsd.org (Postfix) with ESMTP id 3C00113C43E for ; Fri, 29 Jun 2007 08:25:55 +0000 (UTC) (envelope-from roger@gujord.com) Received: from [192.168.1.2] ([192.168.1.2]) by red.newsgrip.com (8.12.8/8.12.5) with ESMTP id l5T8PsqV027963 for ; Fri, 29 Jun 2007 10:25:54 +0200 Message-ID: <4684C212.1070005@gujord.com> Date: Fri, 29 Jun 2007 10:25:54 +0200 From: Roger Gujord Organization: Gujord.com User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: freebsd-jail@freebsd.org References: <468386A5.9040900@gujord.com> <20070628213520.6e561b42@localhost> <4684B4C9.90101@gujord.com> In-Reply-To: <4684B4C9.90101@gujord.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean Subject: Re: Different Netmasks for jails X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2007 08:25:56 -0000 UPDATE: ------- I managed to do what I wanted by adding the following to /etc/rc.d/jail: # init_variables _j eval _netmask=\"\$jail_${_j}_netmask\" # Debugging aid debug "$_j netmask: $_netmask" ... if [ -z "${_netmask}" ]; then err 3 "$name: No netmask has been defined for ${_j}" fi # jail_start() ifconfig ${_interface} alias ${_ip} netmask ${_netmask} and the following for each jail in /etc/rc.conf: jail_jailname_netmask="xxx.xxx.xxx.xxx" I'm not sure if this is the proper way to do it, but it seems to work for me. --Roger