How to Check Open Ports on Windows, Mac and Linux
What is listening on my PC? See which programs accept network connections, spot anything unexpected, and close the ports you do not need. Free script, no install.
8 minutes · uses Open Ports · Last updated 2026-10-17
Step 1: Scan localhost first
Run Port Scan against 127.0.0.1 with the default common-port list. This is the safe case: you are asking your own machine which services answer locally.
Step 2: Know what normal looks like
A developer machine commonly shows 3000, 8000 or 8080 (local preview servers) and occasionally 3306 or 5432 (local databases). A home NAS may show 445 or 5000. What should make you pause on a personal laptop is 3389 (Remote Desktop) exposed on a public network, or any port you cannot tie to software you installed.
Real scan of our test machine: only the local preview server answeredScanning 127.0.0.1 - 6 ports, 200 ms timeout each
(connect scan only; scan machines you own or are authorised to test)
No open ports found in the scanned list.
Note: a filtered (firewalled) port looks the same as a closed one to this kind of scan.
Step 3: Act on the finding
If a port is open that you do not want: stop the service, uninstall the software, or block the port in the firewall. Then re-scan to confirm. If the port is one you do need (for example RDP on a private network), restrict it to trusted source addresses rather than leaving it world-open.
How to read the results
Numbers only help if you act on them. Use this table to turn a reading into a decision:
| If you see | It usually means | Next step |
|---|---|---|
| Port 3000 / 8080 | Local development server | Expected during development; stop it when you are done |
| Port 3389 | Windows Remote Desktop | Disable if unused; if needed, restrict source IPs and require Network Level Authentication |
| Port 445 | SMB file sharing | On public networks, disable file and printer sharing |
| Nothing open at all | Normal for a locked-down laptop | No action needed |
Where this stops working
A connect scan cannot distinguish a filtered port from a closed one, cannot identify the service behind an open port, and does not cover UDP at all. For anything beyond a sanity check, use nmap or a native process-to-port list (ss, netstat, lsof, TCPView).
Security notes
Only ever scan machines you own or have explicit permission to test; scanning third-party hosts can be a criminal offence in many jurisdictions. A connect scan is logged by the target. Treat any unfamiliar open port as a question to investigate, not automatically as an intrusion — but do investigate.
Common questions
Which open ports are normal on a personal PC?
On a developer machine, 3000, 8000 or 8080 (local preview servers) and occasionally 3306 or 5432 (local databases) are expected. A home NAS may show 445 or 5000. What should make you pause is 3389 (Remote Desktop) reachable on a public network, or any port you cannot tie to software you installed.
Do I need to close every open port I find?
No. A locked-down laptop with nothing open is normal, and some ports are needed, for example RDP on a private network. Act only on ports you do not want: stop the service, uninstall the software, or block the port in the firewall, then re-scan to confirm.
Is it legal to scan other computers with this script?
Only scan machines you own or have explicit permission to test. Scanning third-party hosts can be a criminal offence in many jurisdictions, and a connect scan is logged by the target. Point the script at 127.0.0.1 unless you have written authorisation.