[Samba] Graceful WINS resolution across disconnected networks

Bob Richmond bob at lorez.org
Wed Aug 11 14:19:25 MDT 2010

So, I have a samba server running on a host with two interfaces. One 
interface is on an internal network, the other on a WAN 

I actually want the WINS server not to announce hosts on the internal 
network from the outside, and likewise not announce hosts on the 
external network to the inside.

If I don't have this, a machine on the outside will ask the address of 
my samba server's netbios name, and get 192.168.1.x and not be able to 
connect, when I'd ideally want it to respond only with its external 
interface address.

I've sorta hacked it to support this by running two copies of nmbd, one 
pointing at a configuration where it binds to the internal network and 
has a separate "lock dir", and one where it binds to the external 
network with its own "lock dir", effectively making it maintain two 
separate databases.

It would be cool if I could run one copy of nmbd, and have a 
configuration that specifies which networks can reach each other, and 
have nmbd filter out results for hosts that cannot be reached from each 
respective network. Something like "disconnected networks =,". If the requesting source address is in 
one network, and the match is in the other, it should be filtered out as 
if that netbios name didn't exist.

More information about the samba mailing list