Port 445 — SMB
TCP well-known
What runs on port 445
Windows file and printer sharing.
Security considerations
Should never be reachable from the internet. This is the port WannaCry and NotPetya spread over.
Checking whether something is listening
# Linux / macOS — what is bound to the port
sudo lsof -i :445
sudo ss -lntp | grep :445
# Windows
netstat -ano | findstr :445
Get-NetTCPConnection -LocalPort 445
# is it reachable from outside?
nc -zv example.com 445
curl -v telnet://example.com:445
Freeing the port
# find the process, then stop it
sudo lsof -ti :445 | xargs kill # Linux / macOS
netstat -ano | findstr :445 # note the PID, then:
taskkill /PID <pid> /F # Windows
Should this port be open to the internet?
No. Port 445 should never be reachable from a public address. Bind it to localhost or a private network, and reach it through a VPN or bastion host if remote access is genuinely needed. Internet-wide scanners find newly exposed instances of this service within minutes.
Quick reference
| Port | 445 |
| Protocol | TCP |
| Service | SMB |
| Range | Well-known (0–1023) — binding requires root on Unix |
Frequently asked questions
What is port 445 used for?
Windows file and printer sharing.
Is it safe to open port 445?
Should never be reachable from the internet. This is the port WannaCry and NotPetya spread over.
How do I check if port 445 is open?
Locally, sudo lsof -i :445 on macOS or Linux, or netstat -ano | findstr :445 on Windows. From outside, nc -zv host 445 tells you whether anything answers.
Why do I get "address already in use" on port 445?
Another process is bound to it — often a previous run of your own program that did not exit cleanly. Find it with lsof -ti :445 and stop it, or configure your application to use a different port.
Can I change the port this service uses?
Almost always yes, in the service's configuration. Moving off a default port reduces automated scan noise, but it is obfuscation rather than security — a real attacker scans all 65,535.