TCP · Port 445IANA Registered

Port 445 — SMB (Server Message Block)

Windows network file sharing, printer sharing, and named pipe inter-process communication protocol.

⚡ Primary Use Cases & Environments

  • ✓Windows shared network drives
  • ✓Samba Linux-to-Windows file shares
  • ✓Domain controller communication

🛡️ Security & Vulnerability Analysis

Extremely vulnerable when exposed to the internet. Major cyberattacks including WannaCry and NotPetya leveraged SMB vulnerabilities (EternalBlue / MS17-010). Block port 445 at the perimeter router firewall.

🔧 Network Diagnostics & Inspection

1. Check Active Listening Sockets (Local Host)
Terminal Command
$ sudo ss -tuln | grep :445
Inspects whether any local process daemon is bound to port 445.
2. Remote Port & Service Scan (Nmap)
Terminal Command
$ nmap -p 445 -sV --script smb-os-discovery <target-ip>
Probes target IP to determine whether port 445 is open, closed, or filtered.
3. Wireshark Capture / Display Filter
smb2 or tcp.port == 445Wireshark Filter

🔥 Firewall Configuration Rules (UFW & iptables)

UFW (Uncomplicated Firewall)
Terminal Command
$ sudo ufw deny 445/tcp
Applies a persistent Linux UFW firewall rule for port 445.
iptables Command
Terminal Command
$ sudo iptables -A INPUT -p tcp --dport 445 -j DROP
Appends a direct netfilter kernel rule to the INPUT chain for port 445.

❓ Frequently Asked Questions (FAQ)

Why do almost all ISPs block inbound and outbound port 445?

Port 445 is the most frequently exploited network protocol on Windows. Blocking it prevents automated internet-wide ransomware and worm outbreaks.

Related Networking Tools & Guides