Thanks dmizer for helping me fix this problem. It went away when I turned ufw (using gufw) to allow incoming connections.
However when I turned ufw back to block incoming connections and tried the following I could not see any computers on the network.
I checked /var/log/syslog and found out that the ports 137 138 139 445 were source ports not destination ports so I changed it around using the GUI. I wonder if anyone else has this problem.Code:sudo ufw allow proto udp to any port 137 from 192.168.29.0/24 sudo ufw allow proto udp to any port 138 from 192.168.29.0/24 sudo ufw allow proto tcp to any port 139 from 192.168.29.0/24 sudo ufw allow proto tcp to any port 445 from 192.168.29.0/24
My result for the command
Status: activeCode:sudo ufw status numbered
To Action From
-- ------ ----
[ 1] Anywhere ALLOW 192.168.1.0/24 139/tcp
[ 2] Anywhere ALLOW 192.168.1.0/24 445/tcp
[ 3] Anywhere ALLOW 192.168.1.0/24 137/udp
[ 4] Anywhere ALLOW 192.168.1.0/24 138/udp
Thank you for the tip. I've updated the howto.
Actually this is what I have to do for it to work on ubuntu-desktop/ufw
This is to access shares on WinXP/with-firewall and Samba/Ubuntu-server/no-ufw. I will try enabling ufw on Ubuntu-server and see which settings work.Code:sudo ufw allow proto udp from 192.168.1.0/24 port 137 to any sudo ufw allow proto udp from 192.168.1.0/24 port 138 to any sudo ufw allow proto tcp from 192.168.1.0/24 port 139 to any sudo ufw allow proto tcp from 192.168.1.0/24 port 445 to any
Edit (20-Aug09): the problem was that I did not add the netbios_ns line
This is my understanding of the problem:
Client starts a connection from a random high number port (1024-65535) to one of the above ports (137,138/udp 139,445/tcp) on the remote computer. When the remote computer replies to the high port it was blocked by ufw which is set to deny incoming connections.
My original solution (above) allowed connections to any port on the client from the specified ports on the remote computer (insecure).
The netbios_ns solution tracks which connections were initiated by the client and allows the remote computer to respond to ports that would otherwise be blocked. In other words, the remote computer is allowed to reply on the same high port within a given timeout.
Last edited by patsingh; August 25th, 2009 at 08:17 AM.
My home/office setup is as follows:
Desktop running ubuntu 9.04
Laptop running Windows XP Home SP3
Laptop running Mac OS X 10.5
All are on the same local network (the desktop via ethernet, the laptops via wireless).
I wasn't making much progress getting them to talk to each other until I went through the changes in this post. Now file sharing is mostly fixed. I can see and access the shared folders on both my Mac and Ubuntu. However, when trying from Ubuntu to my Windows laptop's, I can see the computer in Workgroup but when I try to open it, it keeps prompting me for a username and password. Why does this happen? What I'm really trying to do is connect as a guest and just access the shared public folder on my Windows laptop. Is there any way to change this?
There are a couple more computers on the way this week as I'm adding a couple more Ubuntu desktops plus another Mac laptops. Was hoping to iron out these quirks so they don't get out of hand.
As a side note - it was very easy to share the printer connected to my Ubuntu desktop (from the Windows laptop - haven't got round to adding it to my Mac).
Last edited by bkb; August 25th, 2009 at 09:20 AM.
Many thanks for your tutorial. After addressing "Problems 1 and 2" I finally was able to mount on my Ubuntu computer a folder from my XP computer. I had so much hard times trying again and again. Your tutorials are well written. There are still so many things I don't understand but it's good when things work!
I'm 100% new to the Linux world - had some experience years ago in the non-GUI Xenix system,but that was long ago, far away and long-forgotten, mostly.
I've been using Ubuntu for just a little over a week, and this particular problem was the most vexing so far. The Windows '98 laptop I have, and my Win XP SP3 system both found the Linux machine, could read from it, share the printer, etc. The Linux box, however, could only see that there is a network here. It seemed to be trying to find my other systems via DNS into the outside world, returning some really strange ip addresses, not the 192.168.*.* I expected. Netbios changes did nothing for this.
What fixed it for me was doing all the main steps in the first few posts, then finally finding a suggestion to install smbfs. After installing smbfs, everything works perfectly. I can read/write files to and from Linux and both versions of Windows.
Now on to bigger and better things, I guess.
Thanks to all for the helps and suggestions.
Hmmmmmmm......your tips wiped out my entire network.
I don't know what happened but after following your steps, I didn't even have a workgroup anymore. May have been the winbind thing, I don't know. In any event, none of your advice worked for me. I see it helped others though and thats good.
Your wins dns advice took down my internet. I changed the nsswitch.conf back to original and the internet came back, but now my SMB network is totally hosed.
I appreciate you trying to help, but I'm a bit 'miffed at 'ya right now. I had to do a re-install.
Last edited by Tankerdog2002; September 11th, 2009 at 11:01 PM. Reason: Just toned it down some.