Netstat shows active network connections and listening ports. It reveals what your system is communicating with.
Common options:
netstat -an # All connections, numeric
netstat -ano # Include process IDs (Windows)
netstat -tulnp # TCP/UDP with processes (Linux)
Connection states:
- LISTENING: Waiting for incoming connections
- ESTABLISHED: Active connection
- TIME_WAIT: Connection closed, cleaning up
What to look for:
- Is the service listening on expected port?
- Are connections established to correct hosts?