TCPWell-Known PortFirewall: Usually Closed
445

SMB / CIFS

What is Port 445?

Port 445 is used by the Server Message Block (SMB) protocol for file sharing, printer sharing, and inter-process communication on Windows networks. Starting with Windows 2000, Microsoft enabled SMB to run directly over TCP on port 445, eliminating the need for the NetBIOS layer (ports 137-139). SMB allows clients to read and write files on remote servers, discover shared resources, and communicate between processes. SMBv1 was the original protocol, but serious vulnerabilities (exploited by EternalBlue/WannaCry) led to its deprecation. SMBv2 and SMBv3 add significant improvements including better performance, larger reads/writes, and encryption. SMB is also implemented by the Samba project for Linux/Unix interoperability with Windows networks.

Common Uses

  • Windows file and printer sharing across networks
  • Network drive mapping in enterprise environments
  • Cross-platform file sharing via Samba
  • Group Policy distribution in Active Directory

Technical Details

Port Number445
ProtocolTCP
CategoryWell-Known
Service NameSMB / CIFS
Default FirewallUsually Closed
Port Test Commands

Copy-paste commands to check port 445 (SMB / CIFS) from your terminal

Test connectivity

Netcat (nc)Check if TCP port is reachable
nc -zv example.com 445
curl (HTTP)Test HTTP response on this port
curl -v --max-time 5 http://example.com:445/
TelnetBasic TCP port connectivity check
telnet example.com 445
nmapScan port 445 with service detection
nmap -p 445 -sV example.com
Bash /dev/tcpPure bash TCP check (no extra tools needed)
(echo > /dev/tcp/example.com/445) 2>/dev/null && echo "open" || echo "closed"

Open port in firewall

UFW (Ubuntu / Debian)
sudo ufw allow 445/tcp
iptables
sudo iptables -A INPUT -p tcp --dport 445 -j ACCEPT
firewalld (RHEL / CentOS)
sudo firewall-cmd --permanent --add-port=445/tcp && sudo firewall-cmd --reload

Security Considerations

!

Port 445 is one of the most attacked ports on the internet. The EternalBlue exploit targeting SMBv1 enabled WannaCry and NotPetya ransomware. Disable SMBv1 completely. Use SMBv3 with encryption. Never expose port 445 to the internet. Apply all Windows security patches promptly. Use network segmentation to limit SMB access. Implement access controls and audit file share permissions.

Popular Ports Reference

The most commonly used and referenced network ports

Related Ports