[Samba] Using the right network interface

Eric Boehm boehm at nortelnetworks.com
Wed Dec 11 13:20:00 GMT 2002


On Wed, Dec 11, 2002 at 12:52:31PM +1100, Simeonidis, Steve wrote:
>>>>> "Steve" == Simeonidis, Steve <SteveSimeonidis at ap.spherion.com> writes:

    Steve> I've tried the bind interfaces only = yes but still the
    Steve> same netstat gives the same results.

Hmmm. That's odd. Maybe we need to see the rest of your smb.conf.

I have samba running on my firewall (Red Hat 7.2) at home and it is
restricted to the internal interface.

netstat -an | grep 137 returns


udp        0      0 192.168.1.1:137         0.0.0.0:*                           
udp        0      0 0.0.0.0:137             0.0.0.0:*                           
unix  2      [ ]         DGRAM                    1372   

Here are all my interfaces

ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:80:C6:F7:8E:0C  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          EtherTalk Phase 2 addr:65280/100
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:92588 errors:0 dropped:0 overruns:0 frame:0
          TX packets:90112 errors:1 dropped:0 overruns:0 carrier:1
          collisions:0 
          RX bytes:59279583 (56.5 Mb)  TX bytes:35587352 (33.9 Mb)

eth1      Link encap:Ethernet  HWaddr 00:01:02:2E:D3:C0  
          inet addr:X.X.X.X  Bcast:255.255.255.255  Mask:255.255.252.0
          EtherTalk Phase 2 addr:65280/200
          UP BROADCAST NOTRAILERS RUNNING  MTU:1500  Metric:1
          RX packets:2180771 errors:0 dropped:0 overruns:0 frame:0
          TX packets:84308 errors:0 dropped:0 overruns:0 carrier:1
          collisions:833 
          RX bytes:161348660 (153.8 Mb)  TX bytes:58081125 (55.3 Mb)

gre0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          NOARP  MTU:1476  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          EtherTalk Phase 2 addr:0/0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:605 errors:0 dropped:0 overruns:0 frame:0
          TX packets:605 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 
          RX bytes:99629 (97.2 Kb)  TX bytes:99629 (97.2 Kb)

And here's my smb.conf (I've deleted the shares for brevity)

# Global parameters
[global]
        security = server
        encrypt passwords = yes
        workgroup = BOEHM
        netbios name = ARACHNE
        server string = Samba Server
        interfaces = 192.168.1.1/24
        #bind interfaces only = Yes
        log file = /var/log/samba/log.%m
        #max log size = 50
        max open files = 1014
        #debug level = 3
        socket options = TCP_NODELAY
        dns proxy = No
        wins support = true
        hosts allow = 192.168.1.
        os level = 65
        domain master = yes

Well, I thought I had "bind interfaces only = Yes" but it is commented
out. I commented out the interfaces lines and restarted Samba. Now

netstat -an | grep 137
udp        0      0 192.168.1.1:137         0.0.0.0:*                           
udp        0      0 X.X.X.X:137      0.0.0.0:*                           
udp        0      0 0.0.0.0:137             0.0.0.0:*                           

shows 2 interfaces.

This is version 2.2.1a. I also shut down the firewall software
(netfilter) temporarily to see if it was causing Samba to be
restricted to one interface, but that wasn't the case.

I'll try building 2.2.5 later and see if it makes a difference.

    Steve> What I'm really trying to do and why I need this is because
    Steve> I want to run 2 instances of SAMBA, a different one on each
    Steve> interface.

That's a different problem. I think I posted a message on this
before. I'll try to find it and send you the reference.



-- 
Eric M. Boehm                  /"\  ASCII Ribbon Campaign
boehm at nortelnetworks.com       \ /  No HTML or RTF in mail
                                X   No proprietary word-processing
Respect Open Standards         / \  files in mail



More information about the samba mailing list