Re: samba inside jails [was: jail/broadcast IP [was: ...]]

2008-10-03 Thread Bjoern A. Zeeb

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.
___
freebsd-jail@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: samba inside jails [was: jail/broadcast IP [was: ...]]

2008-10-03 Thread Alexander Leidinger
Quoting Bjoern A. Zeeb [EMAIL PROTECTED] (from Fri, 3  
Oct 2008 08:21:53 + (UTC)):



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.


I have samba running in a jail (8-current from a month or two ago, no  
multi-IP patch). No problems here.



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.


I use it with network drives, so I'm not sure about broadcasts...

Bye,
Alexander.

--
Truth never comes into the world but like a bastard, to the ignominy
of him that brought her birth.
-- Milton

http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org   netchild @ FreeBSD.org  : PGP ID = 72077137
___
freebsd-jail@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to [EMAIL PROTECTED]