what port or ports are used for File sharing in windows?
what port or ports are used for File sharing in windows?
回答1
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
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
回答2
If file transfer is via FTP - TCP/21, in case of SFTP - TCP/22
445端口
445端口是一个毁誉参半的端口,有了它我们可以在局域网中轻松访问各种共享文件夹或共享打印机,但也正是因为有了它,黑客们才有了可乘之机,他们能通过该端口偷偷共享你的硬盘,甚至会在悄无声息中将你的硬盘格式化掉。