HTTPfy

Port 445 (SMB (Microsoft-DS))

Server Message Block file and printer sharing over TCP, used by Windows shares, Samba, and Active Directory (SYSVOL, Group Policy).

Well-known (system) port, 0-1023 TCP Windows networking Do not expose to the internet

What port 445 is used for

Server Message Block file and printer sharing over TCP, used by Windows shares, Samba, and Active Directory (SYSVOL, Group Policy).

Security: should port 445 be open?

Do not expose to the internet. Never expose SMB to the internet. WannaCry and NotPetya spread through SMBv1 (EternalBlue, MS17-010), and exposed shares invite brute-force and NTLM relay. Disable SMBv1, block 445 at the perimeter, and use a VPN for remote file access. Many ISPs block it outright.

IANA assignment

Service nameProtoDescriptionAssigneeReference
microsoft-ds TCP Microsoft-DS Pradeep Bahl -
microsoft-ds UDP Microsoft-DS Pradeep Bahl -

Check what is listening on port 445

Linux: is anything listening on TCP 445?
sudo ss -tlnp 'sport = :445'
Linux / macOS: which process owns the port
sudo lsof -nP -i :445
Older Linux / BSD (net-tools)
sudo netstat -tlnp | grep ':445 '
Windows (Command Prompt)
netstat -ano | findstr :445
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 445 -State Listen | Select LocalAddress,OwningProcess

Test it from outside

From another machine
nc -vz -w 5 HOST 445
From Windows
Test-NetConnection HOST -Port 445

Block port 445 in the firewall

ufw
sudo ufw deny 445/tcp
iptables
sudo iptables -A INPUT -p tcp --dport 445 -j DROP
nftables
sudo nft add rule inet filter input tcp dport 445 drop
Windows Firewall
New-NetFirewallRule -DisplayName 'Block TCP 445' -Direction Inbound -Protocol TCP -LocalPort 445 -Action Block

Related ports

All port numbers · Open port checker
Assignment data: IANA port number registry (public domain), retrieved 2026-11-10.