[Samba] interfaces parameter use needs clarification
John H Terpstra
jht at samba.org
Fri Jan 31 20:07:22 GMT 2003
On Fri, 31 Jan 2003, Chris Smith wrote:
> On Fri, 2003-01-31 at 14:17, John H Terpstra wrote:
>
> > > Which clearly, and seemingly purposely, leaves out the lo interface.
> >
> > Which is always allowed except when explicitly NOT allowed.
>
> OK, so there is no need to add the lo interface because it is added by
> default.
>
> How about the format of the IP/submask pair:
>
> > > Furthermore in the "Unoffcial Samba HOWTO" it is stated:
> > >
> > > =========================================
> > > A common mistake is to set the interfaces line to the specific IP
> > > address of the box, when it is actually the IP subnet that your
> > > interface is on that you want to use. Assuming your server runs on
> > > 192.168.0.1 and your netmask is 255.255.255.0, your smb.conf file should
> > > look like:
> > >
> > > interfaces = 192.168.0.0/255.255.255.0 127.0.0.1
> > > =========================================
> > >
> > > However this also does not reconcile with the smb.conf manual, nor the
> > > examples which clearly show the use of the IP address of the interface
> > > itself as proper.
>
> Is it indeed a mistake at all to use the IP of the interface vs the
> subnet's address or is the "Unofficial Samba HOWTO" in error here?
> I recognize that if I knew C I might have been able to answer this one
> myself, apologies.
The code actually checks for valid interfaces and compares them to the
address pattern specified. In other words:
Interface: 1.2.3.4/24, known as eth2
if: interfaces = 1.2.0.0/16
interfaces = 1.0.0.0/8
interfaces = eth2
interfaces = 1.2.3.4
interfaces = 1.2.3.4/255.255.255.0
will all work fine.
- John T.
--
John H Terpstra
Email: jht at samba.org
More information about the samba
mailing list