50

How to get list of ports which are in use on the server?

marika.daboja
  • 881
  • 13
  • 27
hrishi
  • 1,531
  • 8
  • 28
  • 43

5 Answers5

79

Open up a command prompt then type...

netstat -a
Abhineet
  • 5,320
  • 1
  • 25
  • 43
Chris Arnold
  • 5,753
  • 5
  • 35
  • 55
11

There are a lot of options and tools. If you just want a list of listening ports and their owner processes try.

netstat -bano
nhahtdh
  • 55,989
  • 15
  • 126
  • 162
Gautam Mandal
  • 119
  • 1
  • 2
  • Note that the "b"-option may require admin-rights. (Error: "The requested operation requires elevation.") – Select0r Mar 08 '19 at 07:22
6

TCPView is a Windows program that will show you detailed listings of all TCP and UDP endpoints on your system, including the local and remote addresses and state of TCP connections. On Windows Server 2008, Vista, NT, 2000 and XP TCPView also reports the name of the process that owns the endpoint. TCPView provides a more informative and conveniently presented subset of the Netstat program that ships with Windows. The TCPView download includes Tcpvcon, a command-line version with the same functionality.

http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx

Micha Wiedenmann
  • 19,979
  • 21
  • 92
  • 137
Ed Guiness
  • 34,602
  • 16
  • 110
  • 145
3

If you mean what ports are listening, you can open a command prompt and write:

netstat

You can write:

netstat /?

for an explanation of all options.

kanngard
  • 947
  • 7
  • 9
1

nmap is a useful tool for this kind of thing

Mikey
  • 2,942
  • 33
  • 37