Modify the registry law
Add a registry key, specific steps:
Click “Start”, “Run”, type “regedit” to open the registry.
Locate the registry key “HKEY_LOCAL_MACHINE\System\Controlset\Services\NetBT\Parameters”
Select “Parameters” New Right “DWORD Value.”
Rename the DWORD value as “SMBDeviceEnabled”
Right-click “SMBDeviceEnabled” select “Edit” in the “numerical data”, “0”
Key details are as follows:
After completion modify the registry to restart the computer, and then CMD run “netstat -an | findstr 445” view port 445 is closed.
Configure the firewall
This method is not shut itself down port 445, but in order to block access to the external port 445 connected to the machine.
Firewall Advanced Settings – Inbound rules – Right-click New Rule – Select UDP, the port number in the dialog box to write 445.
Shut down the server service
Administrator, open cmd, run
net stop server
You need to restart your computer.