From owner-freebsd-jail@FreeBSD.ORG Fri Oct 3 08:25:07 2008 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9AD21065691 for ; Fri, 3 Oct 2008 08:25:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id A05D88FC26 for ; Fri, 3 Oct 2008 08:25:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id ED5E141C678; Fri, 3 Oct 2008 10:25:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id cI1NclToPhND; Fri, 3 Oct 2008 10:25:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 8FF2441C677; Fri, 3 Oct 2008 10:25:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id C051C44487F; Fri, 3 Oct 2008 08:21:53 +0000 (UTC) Date: Fri, 3 Oct 2008 08:21:53 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: =?ISO-8859-1?Q?Nejc_S=28koberne?= In-Reply-To: <48E36B2F.1070707@skoberne.net> Message-ID: <20081003081218.J7528@maildrop.int.zabbadoz.net> References: <48E365FB.10104@skoberne.net> <20081001120836.X7528@maildrop.int.zabbadoz.net> <48E36B2F.1070707@skoberne.net> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-jail@freebsd.org Subject: Re: samba inside jails [was: jail/broadcast IP [was: ...]] 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, 03 Oct 2008 08:25:08 -0000 On Wed, 1 Oct 2008, Nejc S(koberne wrote: Hi, Cc:ing freebsd-jail again. > I would like to make Samba, running in jail, to listen at a broadcast address. > Normally Samba would listen on *.138 and *.137 (UDP), but when in jail, it can > just listens at IP.138 and IP.137, which makes it unable to "see" the requests. So it listens on INADDR_ANY which is not the broadcast address. However the windows world is (was) high on broadcasts. If you have multiple IPs it does listen on *:{port} again but that's only partly the same as what you are probably thinking about. You can still run samba inside a (multi-IP) jail. Back in 2006, about this multi-IP patch, and samba from then I found the following: 1) samba does not respond from the same IP the packet was directed to but from your "Primary IP". This is interesting if you have multiple IPs from the same subnet on the same link and jail. 2) with the multi-IP jail patch I preserve the primary IP (the first IP given for each address family) as such. So you can actually tell a jail what the "primary"/fallback IP would be in case the introduced source address selection does not find any better. 3) In samba it used to be the interfaces = config option that you would set to the (primary) IP of your jail. With the above you should be able to address the samba server inside the jail and exchange files and all that. At least I was able to back then. Things may have changed. Depending on your setup browsing via good old braodcast stuff might not work but in any modern setup that should no longer be needed imho. Good luck. /bz -- Bjoern A. Zeeb Stop bit received. Insert coin for new game.