What are these 2 ports 139 and 445. How can i block them.

Hi,
What are these 2 ports 139 and 445. How can i block them.
In which all cases are these ports used . Will there be any issues blocking them. And is there a GPO way to block these ports.

REgards
Sharath
LVL 11
bsharathAsked:
Who is Participating?
 
dm7941Commented:
  139 and 445 are both used for netbios and windows file sharing.  They are heavily exploited in various forms.  If you are not on a domain, you do not need to allow these ports on a desktop machine unless you are sharing files or printers on your local network.  If you ARE on a windows AD domain, blocking these ports will disable remote managment on any machine you block them on.  You almost certainly do not need to allow the ports to pass through your exterior firewall.   If you block these ports on a windows server, you will have problems with both sharing and authentication.  
   You can block them on the desktop with group policy by defining the "Windows Firewall: Allow File and Print Sharing" (Computer Policy-Administrative Templates-Network Connections-Windows Firewall-Domain Profile) to disabled.  This will prevent the desktop from doing any file sharing, and will essentially shut off all remote management of said desktop.

Bottom line:  In most windows domain environments, disable the ports only on your network-to-internet firewall


One more note,  Blocking these ports on an individual PC blocks the LISTEN, not the connection.  Inbound connections are the only thing blocked.  The PC can still connect to network shares on other machines, assuming it can authenticate.
0
 
Dirtpatch-JenkinsCommented:
They are both tcp ports. generally. if your behind a router, block them in setup.
0
 
bsharathAuthor Commented:
If TCP Port 139/445 is disabled/blocked cant we access any shares on the machine?
0
 
bsharathAuthor Commented:
If TCP Port 139/445 is disabled/blocked cant we access any shares on the machine?
0
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.