Search code examples
linuxnetwork-programmingfirewallsamba

winbindd fails to resolve local network names when firestarter firewall is up on ubuntu


I'm using Samba and windbindd on my linux boxes. Without a firewall up on the linux box I have no trouble resolving LAN machine names:

user@laptop-linux:~$ ping desktop
PING desktop (192.168.1.100) 56(84) bytes of data.
64 bytes from 192.168.1.100: icmp_seq=1 ttl=128 time=0.878 ms

when I start the firewall I get:

user@laptop-linux:~$ ping desktop
ping: unknown host desktop

I have opened up the Samba ports (137-139 445) as well as the mDNS port 5353 with no effect. WINS has been enabled in nsswitch.conf and I've also tried removing the mdns4 entries for host lookup. I can see the DNS query going out regular DNS with my ISP domain suffix attached which is not what I want. I want to use wins / NetBIOS to do the work. Do I have allow some form of broadcast port? Can this be done while maintaining security? I want to have a firewall running on my laptop because I access open hotspots on a regular basis. Thanks


Solution

  • Sorry for necroing this post, but i had considerable trouble figuring this out, and hence am putting it up for anyone else who might run into it. Basically you have to enable incoming packets (NB response packets) coming from port 137/udp of the responding system. In ubuntu 11.04, using ufw, this can be easily done as:

    ufw allow proto udp from 192.168.1.0/24 port 137 to any
    

    This assumes that your LAN is using the 192.168.1.0/24 ip range.