Samba and Firewall Configuration

I’ve been using Guarddog as a GUI for iptables for some time. I’ve configured it to allow connections to Samba network shares, but for some reason it won’t allow me to connect to the shares without disabling the firewall first. The blockage happened despite the proper configuration in Guarddog. So today I decided to look at the problem again and fix it.

After inspecting the output of ‘dmesg’, I found out that it tries to connect to 192.168.2.255 (192.168.2.* is my network), which is the broadcast address for the network. I tried enabling connections to that address, and to my surprise this fixed the problem. I guess Samba, for some reason, requires access to the broadcast address for some name/address lookup of hosts in the network.