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

Teodor Iacob theo at macsys.eu
Fri Oct 3 20:52:39 GMT 2008


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 =
        hosts allow = 127.0.0., 10.10.10.
        bind interfaces only = yes
        socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        preferred master = yes
        domain master = yes
        local master = yes
        os level = 100
        remote announce =
        socket address =
        log level = 1

        comment = Home Directory
        valid users = %S
        read only = No
        browseable = No

        comment = Public Stuff
        path = /disk2/comun
        force user = disk
        force group = disk2
        read only = No

Any help is highly appreciated.

Thank you,



__________ Information from ESET NOD32 Antivirus, version of virus signature database 3494 (20081003) __________

The message was checked by ESET NOD32 Antivirus.


More information about the samba mailing list