[Samba] Nmbd is using the wrong ip address as source
samba at piven.org
samba at piven.org
Sat Oct 4 01:40:31 GMT 2008
Teodor Iacob wrote:
> 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:
> 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
> hosts allow = 127.0.0., 10.10.10.
> bind interfaces only = yes
> remote announce = 10.10.10.255/HOSTNAME
> socket address = 10.10.10.1
More information about the samba