Port 445 / TCP
SMB / CIFS
Port 445 – SMB / CIFS Protocol Specification
Technical analysis, security advisories, vulnerability mitigation, and firewall syntax for TCP/UDP port 445 (SMB / CIFS).
Port Number
445
Transport Protocol
TCP
Port Range Type
Well-Known (0-1023)
Default Status
Restricted / LAN
Service Description & Architectural Context
Server Message Block for Windows file sharing and RPC execution.
IANA / RFC Designation:
Port 445 is assigned to SMB / CIFS under the Internet Assigned Numbers Authority (IANA) service name registry. In enterprise infrastructure and homelab setups, services listening on this port must follow the principle of least privilege.
Security Analysis & Attack Surface Assessment
NEVER expose port 445 to the public internet (target of WannaCry). Use VPN.
Hardening Recommendations:
- Do not expose port 445 to public WAN interfaces unless authenticated TLS or VPN wrapping is strictly enforced.
- Enforce rate-limiting using Fail2ban, CrowdSec, or cloud edge DDoS protection.
- Audit active listening sockets locally:
ss -tulpn | grep :445ornetstat -ano | findstr :445.
Firewall Rule Snippets for Port 445
UFW (Ubuntu / Debian Linux)
sudo ufw allow 445/tcp
iptables (Standard Linux Kernel)
sudo iptables -A INPUT -p tcp --dport 445 -j ACCEPT
Windows PowerShell (Defender Advanced Firewall)
New-NetFirewallRule -DisplayName "Allow Port 445" -Direction Inbound -LocalPort 445 -Protocol TCP -Action Allow