On Wed, 1 Oct 2008, Nejc S(koberne wrote:


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.

Bjoern A. Zeeb              Stop bit received. Insert coin for new game.
freebsd-jail@freebsd.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to