Connections between applications work much like conversations between humans. The conversation is started by someone speaking. If no one is listening, then the conversation doesn’t get far. How do you know who’s listening on a Windows PC? The
Netstat command-line utility
and the PowerShell
Get-NetTCPConnection
cmdlet
.
Not a reader? Watch this related video tutorial!
Local Address
– shows the local IP address and port that is listening. For many services, this will be 0.0.0.0 for the IP part, meaning it is listening on all network interfaces. In some cases, a service will only listen on a single Network Interface (NIC). In that case, netstat will show the IP address of the NIC. A colon separates the IP address from the port that it is listening on.
Foreign Address
– shows the remote IP address the local connection is communicating with. If the
Foreign Address
is
0.0.0.0:0
, the connection is listening for all IPs and all ports. For established connections, the IP of the client machine will be shown.
State
– shows the state the port is in, usually this will be
LISTENING
or
ESTABLISHED
.
You can now see the same general information that netstat provided you by now; by default, you have information on the
OwningProcess
(the
-b
switch on netstat) and the
AppliedSetting
field, which relates to the network profile the connection is a part of.