•Arnošt Havelka
Port Scanning
Identify open ports and active services.
Start Interactive LessonPorts are like doors into your computer. Web servers open port 80, Email uses 25, etc. A "Port Scan" checks which doors are open. While professional tools like Nmap are standard, Windows has built-in ways to check local ports.
1. Checking Your Own Ports (Netstat)
Use netstat to see what connections your computer has established and which ports it is listening on.
Try the command
List all open ports numerically!
Build the command
netstat
Terminal
C:\Users\Student>netstat -a
Active Connections
Proto Local Address Foreign Address State
TCP desktop-sim:50123 google.com:https ESTABLISHED
TCP desktop-sim:50124 microsoft.com:https ESTABLISHED
TCP desktop-sim:50125 azure.com:https TIME_WAIT
TCP localhost:http-alt *:* LISTENING
2. Analyzing the Output
- LISTENING: The port is open and waiting for a connection (e.g., a web server running on your machine).
- ESTABLISHED: An active connection exists (e.g., your browser loading a webpage).
Terminal
C:\Users\Student>netstat -an | find "LISTENING"
3. Testing a Remote Port (Telnet/PowerShell)
How do you check if another computer has a port open?
Old school: telnet scanme.nmap.org 80
Modern way: PowerShell.
powershell -Command "Test-NetConnection scanme.nmap.org -Port 80"
Knowledge Check
1 / 3Which netstat flag shows 'Listening' ports?
References
These documentation links provide authoritative details for the commands used in this article.
Up Next
Practical: System Audit
Scripting a professional system inventory report.