Port 445 · TCP

Port 445: SMB (file and printer sharing)

Server Message Block, Windows file and printer sharing: mapped drives, shared folders, network printers and much of Windows remote management.

Protocol
TCP
On Windows
System (PID 4, the Server service, LanmanServer)
Risk if open to the internet
High

Seeing it on your PC

System (PID 4) listening on 445 is normal. Connections to a NAS or another PC on your network on 445 are file sharing.

Should you block it?

Never let 445 be reached from the internet: WannaCry spread through exposed SMB in 2017. Microsoft also recommends blocking outgoing 445 to the internet, because a link to a file share on an attacker's server can make Windows send it your sign-in hash. Keep it open on your local network if you share files.

Check it on your PC

Run this in PowerShell to see what is using port 445 right now, and which program owns it:

Get-NetTCPConnection -LocalPort 445 -ErrorAction SilentlyContinue | Select-Object LocalAddress,LocalPort,RemoteAddress,RemotePort,State,@{n='Process';e={(Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue).ProcessName}}

No output means nothing is using the port at the moment. For every connection at once, paste netstat -ano into the netstat explainer.

Block it in Windows Firewall

In PowerShell run as administrator, this stops other computers from connecting to this port on your PC. It does not stop your own programs connecting out.

New-NetFirewallRule -DisplayName "Block inbound TCP 445" -Direction Inbound -Protocol TCP -LocalPort 445 -Action Block

Undo it with Remove-NetFirewallRule -DisplayName "Block inbound …", using the same name. If you depend on the service on your local network, this rule stops that too.