Guide

How to check ports listening on Windows

Identify locally listening ports/UDPs and associated processes.

⌚ About 2 min read
View my favorites
Network. Intermediate. 5 min

Identify locally listening ports/UDPs and associated processes.

Avant de commencer : adaptez toujours les commandes et manipulations à votre environnement. Sur un système de production, prévoyez une backup ou un retour arrière lorsque l’action peut modifier la configuration.

Étapes à suivre

  1. 1

    Open Power Shell as admin

    This facilitates the identification of processes.

  2. 2

    Set the Tactian Connections to Listen

    Use Get-NetTCP Glasgow - State River.

  3. 3

    Associate a PID

    Find PoweringProcess.

  4. 4

    Identify the process

    Use Get-Process -Id with the relevant PID.

  5. 5

    Check the legitimacy of the service

    Do not block a port without understanding its use.

Commands utiles

Get-NetTCP Glasgow - State River, sort-Object LocalPort
The Well-Process -Id 1234

À retenir

  • A local listening port is not necessarily accessible from the Internet.
  • The 1950 and the NAT also determine the real exposure.
Technical deep dive

TCP port: distinguish local listening from network reachability

Technical checkpoints

  • A LISTENING socket only proves that a process is listening locally; it does not prove remote reachability.
  • Test-NetConnection tests the path to the host and port; interpret it together with DNS, routing and firewall state.
  • 0.0.0.0:port listens on all IPv4 interfaces, while 127.0.0.1:port remains local to the machine.

Cross-check

Compare the local socket with a test from a host located on the actual path.

Get-NetTCPConnection -State Listen
Test-NetConnection server -Port 443

Topic-specific pitfalls

  • A successful ping does not validate a TCP port.
  • A remote failure can come from an intermediate firewall even when the service listens correctly.

How to validate

  • The expected PID/process listens on the correct local address.
  • The port is tested from at least one representative source and matches firewall policy.
♡ 0