[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 //10.9.8.1/public -Unot_a_user
Enter not_a_user's password:
Connection to 10.9.8.1 failed (Error NT_STATUS_CONNECTION_REFUSED)

# smbclient //127.0.0.1/public -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
[global]
   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 = 127.0.0.0/8 eth0
interfaces = 127.0.0.0/8 10.9.8.0/8
;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

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

[public]
  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 = 127.0.0.0/8 10.9.8.0/8
to
     interfaces = 10.9.8.0/8
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
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          inet addr:10.9.8.1  P-t-P:10.9.8.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          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