windows file sharing

When dealing with windows file sharing, I've noticed it tries 135 and 137.  If those are not open it tries 445.

Am I correct to assume if I open just 445, I won't need to open 135 and 137?
Who is Participating?
mcsweenConnect With a Mentor Sr. Network AdministratorCommented:
NetBIOS over TCP/IP is for name resolution.  If you only want to open TCP 445 you must:

1. Access the shares by IP address only (\\\sharename)
2. Setup DNS to resolve names on the LAN
3. Add IP/hostname mappings to your hosts file on each computer

Just out of curiosity where does this firewall reside that you are opening ports on?
mcsweenSr. Network AdministratorCommented:
you need TCP 139, 445 and UDP 137, 138.  SMB happens on 445 but you also need NetBIOS over TCP/IP which the other 3 ports cover.
Incorrect. Your own assumption is indeed correct, only 445.
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to and use offer code ‘EXPERTS’ to get 10% off your first purchase.

And 135 is something different, it's rpc.
Natty GregIn Theory (IT)Commented:
What Mcknife said, you definitely don not want 135 n 137 open
trojan81Author Commented:
So officially which is the port?  I know 445 works. Why does Microsoft talk about other ports?  
It seems to me it tries other netbios over tcp first and then if that doesnt work, it tries 445.
McKnifeConnect With a Mentor Commented:
That is it, exactly.
Microsoft would surely "promote" to only open port 445 if there weren't people who don't know about name resolution. That said: if you have DNS running like on a domain or, if no DNS is at hand, if you feel able to edit the host file, or, if you feel comfortable with using IPs, of course you should use and open only 445.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.