Sunday, 16 January 2011

Finally!

As always, my intellect has proved to be inadequate for the needs of my ambition!

After weeks (perhaps months) of failing to get my computers to talk to each other using host names (NetBios) and blaming samba, I've finally managed to resolve the problem.

It turns out that samba was working properly all the time and so too was Ubuntu. More importantly, so was my firewall! I could get samba working on my laptop (an old DELL Inspiron 1501 running Karmic) and access everything on the network except my Ubuntu desktop: the reason that samba worked unhindered on the this device and not the desktop is that I hadn't enabled the firewall on the laptop so there was nothing to block the NetBios broadcasts! I use Ubuntu's Uncomplicated Firewall (ufw) on my desktop and enabled it this afternoon, presuming that opening up the necessary ports (137, 138, 139, & 445) would be all that was need to allow host/client communications between nodes.

sudo ufw enable
sudo ufw status


However, enabling ufw on the laptop immediately broke samba leading to the inevitable conclusion that it was a firewall issue and not a samba issue that was causing my difficulties.

It turns out that the "kernel has network connection tracking modules. The module for netbios-ns (UDP port 137) is not loaded by default. You must turn it on for Samba to penetrate the ufw firewall". A simple change to the /etc/default/ufw configuration file (on both laptop and desktop), adding the firewall rules, and restarting samba was all that was required to finally deliver server/client services using host names!

Now for some extra reading to really understand how samba works.

No comments:

Post a Comment