In any Windows version XP or Vista or even Win7, you can use the PortQry command line port scanner to see all the listening ports on a remote computer.
If this tool is not installed on your computer, you can download it from the MS Download Center. Click here to go to download page.
PortQry reports the status of TCP/IP ports in one of the following ways:
- Listening – Some service is listening on this port .Portqry.exe received a response from the port.
- Not listening – No process is listening on the port of the target system. Portqry.exe received an Internet Control Message Protocol (ICMP) “Destination Unreachable – Port Unreachable” message back from the target UDP port. Or if the target port is a TCP port, Portqry received a TCP acknowledgement packet with the Reset flag set.
- Filtered – Portqry.exe did not receive a response from the port. A process may or may not be listening on the port. By default, TCP ports are queried three times, and UDP ports are queried one time before a report indicates that the port is filtered.
portqry -n name_to_query [-p protocol] [-e || -r || -o endpoint(s)]
Common command line switches:
-n [name_to_query] IP address or name of system to query
-p [protocol] TCP or UDP or BOTH (default is TCP)
-e [endpoint] single port to query (valid range: 1-65535)
-r [end point range] range of ports to query (start:end)
To check a single port, use the -e switch:
portqry -n java4learners.com -e 80
For a range of ports, use the -r switch:
portqry -n java4learners.com -r 80:85
You can replace the HostName with the IP address as needed.