Port 445: SMB

TCP 445 is the port for Server Message Block (Windows file sharing). Never on the internet. Many ISPs block 445 for this reason; use a VPN for remote file access.

Port 445 at a glance
ServiceServer Message Block (Windows file sharing)
ProtocolTCP
Exposure riskHigh: do not expose to the internet
RangeWell-known (0–1023): binding needs root/admin on Unix

Your public IP is pre-filled. The test connects over TCP from NetKit's server, so it shows what the internet sees.

What port 445 does

Windows file and printer sharing, Active Directory group policy, and Samba on Linux and NAS devices all use SMB on 445. It was the vector for WannaCry and NotPetya (EternalBlue, 2017).

Should port 445 be open?

Never on the internet. Many ISPs block 445 for this reason; use a VPN for remote file access.

Find what's listening on port 445

  • Linux: sudo ss -tulpn | grep :445
  • macOS: sudo lsof -nP -i :445
  • Windows: netstat -ano | findstr :445, then look up the PID in Task Manager.

Open or block it in a firewall

  • ufw: sudo ufw allow 445/tcp (or deny)
  • firewalld: sudo firewall-cmd --add-port=445/tcp --permanent && sudo firewall-cmd --reload
  • Windows: New-NetFirewallRule -DisplayName "Port 445" -Direction Inbound -Protocol TCP -LocalPort 445 -Action Allow

Port assignment per the IANA Service Name and Transport Protocol Port Number Registry. Test several ports at once with the port scanner, or any port with the open port checker.

Questions about port 445

What is port 445 used for?
Server Message Block (Windows file sharing). Windows file and printer sharing, Active Directory group policy, and Samba on Linux and NAS devices all use SMB on 445. It was the vector for WannaCry and NotPetya (EternalBlue, 2017).
Is port 445 TCP or UDP?
TCP. SMB uses TCP port 445.
Is it safe to open port 445?
High: do not expose to the internet. Never on the internet. Many ISPs block 445 for this reason; use a VPN for remote file access.
How do I check if port 445 is open?
Use the checker on this page: it connects to your host on TCP 445 from the internet. Locally, run nc -vz host 445 (macOS/Linux) or Test-NetConnection host -Port 445 (PowerShell). To see what is listening on your own machine, run ss -tulpn | grep :445 (Linux) or netstat -ano | findstr :445 (Windows).

← Port 443 (HTTPS) · Port 465 (SMTPS) →