[Samba] Nmbd is using the wrong ip address as source

Frank Gruman fgatwork at verizon.net
Sun Oct 5 19:28:21 GMT 2008


On Sun, 2008-10-05 at 18:35 +0300, Teodor Iacob wrote:

> Does anybody have a suggestion for another list or forum to address
> this issue?
> 
> 
> > -----Original Message-----
> > From: Teodor Iacob 
> > Sent: 4 octombrie 2008 09:14
> > To: samba at piven.org; samba at lists.samba.org
> > Subject: RE: [Samba] Nmbd is using the wrong ip address as source
> > 
> >  
> > 
> > > -----Original Message-----
> > > From: samba-bounces+theo=macsys.eu at lists.samba.org
> > > [mailto:samba-bounces+theo=macsys.eu at lists.samba.org] On Behalf Of 
> > > samba at piven.org
> > > Sent: Saturday, October 04, 2008 4:41 AM
> > > To: samba at lists.samba.org
> > > Subject: Re: [Samba] Nmbd is using the wrong ip address as source
> > > 
> > > Teodor Iacob wrote:
> > > > Hello,
> > > > 
> > > > I have a linux box with the following S/W versions:
> > > > CentOS release 5.2 (Final)
> > > > Linux ns.hostname.ro 2.6.18-92.1.13.el5 #1 SMP Wed Sep 24
> > > 19:32:05 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
> > > > Version 3.0.28-1.el5_2.1
> > > > 
> > > > My server has 2 IP interfaces, eth0: with the public ip
> > > address and br0: for the private subnet.
> > > > Br0 being a bridge ip interface between eth1 and tap0 ( for
> > > openvpn ).
> > > > 
> > > > Now my problem is that the nmbd is doing the netbios
> > > broadcasts using the eth0 ip address instead
> > > > of the br0 one. I'm only interested in enabling samba on
> > > the local network (br0). I have checked
> > > > this by using tcpdump on another linux machine in the
> > > network and saw the broadcasts with the source
> > > > address the eth0 ip. Nmbd claims to win the master browsing
> > > election, but in reality the windows machines
> > > > ignore the election packets and another machine becomes
> > > master and the browsing list is messed up..
> > > > The smbd works just fine, connecting to the shares manually
> > > works correctly.
> > > > 
> > > > How can I make nmbd to use the correct ip address? ( btw, I
> > > removed the bridge config just for testing
> > > > and only enabled ip on the eth1 and the same problem.. ). I
> > > saw that in the previous version there was
> > > > a parameter "-I" to force the source address..
> > > > 
> > > > For reference this is my smb.conf:
> > > > [global]
> > > >         workgroup = HOSTNAME
> > > >         netbios name = HNS
> > > >         interfaces = 10.10.10.1 127.0.0.1
> > > 
> > > ... why not just say "interfaces = br0" so that it binds to your 
> > > private interface (which I presume owns 10.10.10.1)?  You 
> > don't need 
> > > to have Samba listen on the loopback address if you can 
> > talk to it on 
> > > another local address.
> > 
> > I mentioned also br0 in my quest of trying all possibilities 
> > I could think of.. No change.
> > But bind is only for listening, my problem is when nmbd it 
> > sends packets by itself to make the election. I told you smbd 
> > works fine and I can see from netstat -an at the LISTEN part 
> > that it was only bound to the 10.10.10.1:139 and 10.10.10.1:445
> > 
> > 
> > > 
> > > >         hosts allow = 127.0.0., 10.10.10.
> > > >         bind interfaces only = yes
> > > [snip]
> > > >         remote announce = 10.10.10.255/HOSTNAME
> > > >         socket address = 10.10.10.1
> > > 
> > > Don


First of all, thank you for your patience on volunteer attempts to help
you resolve your issue (considering it is still the weekend in much of
the world).

Now, can you include a portion of the tcpdump you viewed from the other
machine (particularly the part where the wrong address is appearing).
Also, I am assuming you have restarted both smbd and nmbd after each
configuration change.

To verify that your samba settings are being read properly, try to run
"netstat -nap |grep [sn]mbd" to see which ports are open on your local
machine.  Also, try running "nmblookup -B 10.10.10.255 server" to ensure
that nmbd is responding to name server queries on the broadcast address.

I Googled a moment, and came up with much of the above from her -
http://samba.org/~tpot/articles/multiple-interfaces.html

Let us know how it goes.

Regards,
Frank


More information about the samba mailing list