what port or ports are used for File sharing in windows?

Posted on

QUESTION :

I want to know on the windows operating system, what is the port number for the file sharing service?For example as you know the port number for HTTP service is 80. So I need to know the port number of file sharing protocol?

ANSWER :

I’ve seen all of these..file sharing related

UDP-137, UDP-138, TCP-139,TCP-445

And possibly TCP port 135, though that may be something to do with something called “RPC” (source (archived)).

on an windows 7 machine all of those are listening. Some are related to NETBIOS so you can do start...\compname

This site adds:

If the server has NBT enabled, it listens on UDP ports 137, 138, and
on TCP ports 139, 445. If it has NBT disabled, it listens on TCP port
445 only.

And this site (archived) mentions:

“In Windows 2000/XP/2003, Microsoft added the possibility to run SMB
directly over TCP/IP, without the extra layer of NetBT. For this they
use TCP port 445. “

So in 2K,XP,2003…and I suppose Win 7,8, it is possible to run file sharing on only port 445 But you’d be doing start...\ip rather than start..\compname

If file transfer is via FTP – TCP/21, in case of SFTP – TCP/22

Leave a Reply

Your email address will not be published. Required fields are marked *