[Samba] unable to have smb listen on NIC tun0 or 10/8 IP addres

Sophie Loe sophie at klunky.co.uk
Fri Dec 26 14:31:15 MST 2014

Hi everybody and merry Chrissy!

I have smb listening to two interfaces and with tun0 this failed. 
Package was from Debian 7 - 2:3.6.6-6+deb7u4

#  smbclient // -Unot_a_user
Enter not_a_user's password:
Connection to failed (Error NT_STATUS_CONNECTION_REFUSED)

# smbclient // -Unot_a_user
Enter not_a_user's password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.6]
smb: \> quit

This was my config:
# cat smb.conf
   workgroup = WORKGROUP
   server string = %h server
;   wins server = w.x.y.z
   dns proxy = no
;   name resolve order = lmhosts host wins bcast
disable netbios = yes

;   interfaces = eth0
interfaces =
;interfaces = tun0 lo
bind interfaces only = yes
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n
*Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user

   comment = Home Directories
   browseable = no
   read only = yes
   create mask = 0700
   directory mask = 0700
   valid users = %S

  path = /samba/public_data
  guest ok = yes
  read only = no

I can see smb listening on tcp:
smbd      24992          root   27u  IPv4 3142594262      0t0  TCP
localhost.localdomain:445 (LISTEN)
smbd      24992          root   28u  IPv4 3142594263      0t0  TCP
localhost.localdomain:139 (LISTEN)

and nmb udp was disabled.

However when I changed ,
     interfaces =
     interfaces =
and I tried also with     
     interfaces = tun0

Nothing was listening with lsof!

The NIC this should come from is :
# ifconfig  tun0
tun0      Link encap:UNSPEC  HWaddr
          inet addr:  P-t-P:  Mask:
          RX packets:215 errors:0 dropped:0 overruns:0 frame:0
          TX packets:162 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:52569 (51.3 KiB)  TX bytes:17103 (16.7 KiB)

If somebody has some festive spirit left I'd be really grateful if
they'd point out my configuration mistake! :)

Kind regards, Sophie.

More information about the samba mailing list