Scan Your System for Open Ports

Each open network port on your computer is a potential security vulnerability. Fortunately, there's a way to scan your computer for open ports so you know which holes to patch. Start by opening a command prompt window (cmd.exe) and running utility by typing netstat /a /o. The Active Connections utility displays its information in these five columns:

Column

Description

Proto

This will be either TCP or UDP, representing the protocol being used.

Local Address

This column has two components: the computer name and either a port number or the name of a service.

Foreign Address

For active connections, you'll see the name or IP address of the remote machine, followed by the port number. For inactive connections (showing only the open ports), you'll typically see only *:*.

State

This shows the state of the connection (TCP ports only). For server processes, you'll usually see LISTENING here, signifying that the process has opened the port and is waiting for an incoming connection. For connections originating from your computer, such as a web browser downloading a page or an active Telnet session, you'll see ESTABLISHED here.

PID

This is the Process Identifier of the application or service that is responsible for opening the port; see the rest of this section for help with matching up the PID with an application or process.

Warning

Don't be alarmed if you see a lot of open ports. Just make sure you thoroughly track down each one, making sure it doesn't ...

Get Windows XP Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.