Bob Richmond
2010-Aug-11 20:19 UTC
[Samba] Graceful WINS resolution across disconnected networks
So, I have a samba server running on a host with two interfaces. One interface is on an internal 192.168.1.0/24 network, the other on a WAN address/network. 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 = 192.168.0.0/24,192.168.1.0/24". 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.