[Samba] Configuring a samba server with two NICs

Fabio egalua at hotmail.com
Fri Jun 13 10:22:02 GMT 2008

Hi all,

I am trying hard to configure samba, but I can not achieve my goals.
Other than standard man pages, I have seen also many posts/documents 
samba with multiple nics, but I couldn' find any relevant to me.

So, please, let me explain my settings and what I am looking to set up.

First of all, my desktop runs ubuntu 8.04 with samba 3.0.28a
On the pc I have 2 nics, eth0 and eth1.
eth1 has address
eth0 has address

The network on eth1 is a company network, with many windows/unix pcs
on it and a wins server at the address 

The network on eth0 is a small private network, in the sense that I attach
to it only my laptop with a crossed cable and I use the desktop to share 
network and services with the laptop. The laptop is an eeepc900 with its
Xandros default distribution and samba 3.0.24-6, with the default smb.conf
(I include at the end of the message the result of 
cat smb.conf | egrep -v "^(#|;| *$)"
on the eeepc)

I want to share a directory (/media/matematica/libri) and I want that it
is possible to have (free but readonly) access to it only from a bunch of 
trusted pcs: the one attached at eth0 (192.168.23.) 
and two on the eth1 (, plus myself (
Finally, at least on the eth1 network, I want to be part of the workgroup

Summing this up, I wrote the following smb.conf on my desktop:

wins server =
domain master = no
local master = no
workgroup = DOCENTI
server string = Stumbo
hosts deny = ALL
hosts allow = 192.168.23.
security = share
guest ok = yes
path =	/media/matematica/libri
read only = yes

It works partially, in the sense that all is ok on eth1: I am part of the
workgroup DOCENTI, the trusted pcs can access the shared dir, whereas all
others can't (I would also like to be invisible to the others, but I don't
think this is possible...)

On the other hand, from the laptop side I can't see my desktop: what
should I do in order to see the shared dir also from the laptop?

Thanks a lot for your help


cat smb.conf | egrep -v "^(#|;| *$)"

include = /etc/opt/xandros/xandrosncs/run/samba_wins
   workgroup = WORKGROUP
   server string = %h server (Asus Eee PC)
   dns proxy = no
   name resolve order = lmhosts host wins bcast
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
security = share
   encrypt passwords = true
   passdb backend = tdbsam
   ldap delete dn = yes
   obey pam restrictions = yes
   invalid users = root
   map to guest = Bad User
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\sUNIX\spassword:* %n\n 
   	*Retype\snew\sUNIX\spassword:* %n\n 
	*password\supdated\ssuccessfully* .
   client use spnego = no
   load printers = no
   printing = cups
   printcap name = cups
   socket options = TCP_NODELAY
   dos filetimes = yes
   display charset = UTF8
   unix charset = UTF8
   unix extensions = no


the included file in smb.conf contains
wins server =

More information about the samba mailing list