Using netstat to determine listening ports
The netstat command can be used to determine listening ports with different operating systems. The command for Windows would be:
netstat –na | find /i “Listening”
Newer versions of Windows include a –b parameter to determine executables:
The syntax is similar with Linux:
netstat –na | grep –i listen
With the Windows platform, a nice utility for determining listening ports is CurrPorts found at
http://www.nirsoft.net/utils/cports.html.