3

I am having a hard time understanding what 'Listening' refers to when I am looking at the netstat results of my PC for example. Does it mean I have an application or service that is waiting for a request?

2 Answers 2

1

Use the -b option on Windows' netstat command to show what program is listening

  -a            Displays all connections and listening ports.
  -b            Displays the executable involved in creating each connection or
                listening port. In some cases well-known executables host
                multiple independent components, and in these cases the
                sequence of components involved in creating the connection
                or listening port is displayed. In this case the executable
                name is in [] at the bottom, on top is the component it called,
                and so forth until TCP/IP was reached. Note that this option
                can be time-consuming and will fail unless you have sufficient
                permissions.

Generally, it is only server type applications that listen for incoming connections. Windows however also has services that listen for NETBIOS broadcasts and other types of MS network chatter.

C:\> netstat -ab

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    Boxname:http           Boxname:0              LISTENING       1708
  [Apache]

  TCP    Boxname:netbios-ssn    Boxname:0              LISTENING       4
  [System]

  …
1
  • Thanks. So do applications such as Microsoft Outlook never 'Listen'? Sep 18, 2011 at 20:05
2

More or less, consider a server must listen on a port before it can do anything. So a webserver will listen on port 80 to get a request, then serve up a page.

3
  • So if I have say Firefox open accessing Superuser.com, would anything be listening? The reason I ask is I am confused by what the author at dti.ulaval.ca/webdav/site/sit/shared/Librairie/di/operations/… meant when he says In lines saying 'LISTENING', you need the local port to identify what is listening there. Sep 15, 2011 at 23:31
  • just run "netstat -ba" to list the applications which are listening where. Sep 16, 2011 at 0:07
  • I know I can see the applications that are listening however how do I know if it is a local service that is attempting to listen to an external request. For example, if I have Microsoft Outlook running what should I expect to see Sep 16, 2011 at 0:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .