Windows – SMB without port 445

portsambasmbwindows 10

I have a samba share, and the network my devices are on blocks communication over port 445 (the standard SMB TCP port). Linux devices and Macs can connect to this device because they can communicate with the server using port 139 (NBT over IP), which is not blocked Windows devices, however, seem to insist they communicate over port 445.

Is there any way for me to tell Windows 10 to use port 139 without relying on port 445?

Best Answer

I got this working by disabling SMBv2/v3 on Windows 10:

sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc.exe config mrxsmb20 start= disabled

then Restart the computer. To reverse this change and re-enable SMBv3 run the following commands at at the elevated command prompt

sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
sc.exe config mrxsmb20 start= auto

UPDATE: I've renabled SMBv2 on Windows 10 and tried all the protocols limits on the server. NT1 works. So you can just add the following line to the server main smb.conf file instead of the above. I prefer this method because it will affect all my Windows 10 machines centrally:

server max protocol = NT1
Related Question