Port 445: SMB

Port 445 (TCP) is used by SMB. Windows file and printer sharing (SMB 2/3). Never expose to the internet: worms such as WannaCry spread through it.

445Port
TCPProtocol
microsoft-dsIANA service name
Windows networkingCategory

Port range

445 is a well-known (system) port (range 0–1023). On Linux and macOS, binding to it traditionally needs root or the CAP_NET_BIND_SERVICE capability.

Security

Port 445 should not be reachable from the public internet. Restrict it to trusted networks or a VPN, and scan your public IP to confirm it is closed.

Open port 445 in a firewall

ufw         sudo ufw allow 445/tcp
iptables    sudo iptables -A INPUT -p tcp --dport 445 -j ACCEPT
firewalld   sudo firewall-cmd --permanent --add-port=445/tcp
Windows     New-NetFirewallRule -DisplayName "SMB 445" -Direction Inbound -Protocol TCP -LocalPort 445 -Action Allow

Check if port 445 is open

nc -vz example.com 445
Test-NetConnection example.com -Port 445   # PowerShell
sudo ss -tulpn | grep ':445 '   # what is listening locally (Linux)

Other windows networking ports

Frequently asked questions

What is port 445 used for?
SMB. Windows file and printer sharing (SMB 2/3). Never expose to the internet: worms such as WannaCry spread through it.
Is port 445 TCP or UDP?
TCP.