Introduction
This guide details how to use Microsoft’s PortQry utility. This simple tool is used to establish whether a target system has specific ports open or not to aid with troubleshooting.
Downloading PortQry
Version 2 of PortQry can be downloaded free of charge from Microsoft’s web site:
https://www.microsoft.com/en-us/download/details.aspx?id=17148
Version 1 of PortQry is for older Windows operating systems (Windows 2000-based computers).
This guide covers Version 2 which works on all of the latest operating systems (as of September 2016).
How PortQry Works
PortQry scans the port(s) specified on a target system and provides feedback on the port’s status. This feedback is detailed as below:
| Listening | PortQry has successfully received a response from the port specified in the query. A process such as an application or service is listening on this port and indicates the port is likely open |
| Not Listening | PortQry has reached the target machine but a process such as an application or service is not listening on this port. This indicates the port is not in use but is not necessarily blocked. |
| Filtered | PortQry did not receive a response from the port. A process may or may not be listening on this port. This indicates the port is blocked and a firewall on the router/switch or target machine is managing access to this port. |
Using PortQry
Run PortQry on a machine which is attempting to connect to the target using the port in question. PortQry can be used on any other machine on the network but it would need to cross the same network path to rule out filtering done by routers/switches.
PortQry can be opened in Command Prompt by going to:
Start | Run, type CMD, press OK
In Command Prompt, locate to the folder where PortQry is stored. For example, if in C:\PortQryV2\ type:
cd\
cd c:\portqryv2
Type portqry to display the list of command options available as seen below:

PortQry Commands
The following command will query the target IP address 192.168.1.1 and provide the status of TCP port 25:
portqry –n 192.168.1.1 –p tcp –e 25
-n IP or hostname of target
-p Type of port, i.e. TCP, UDP or BOTH
-e Port number, i.e. 25

From the results shown, the scan has detected the default service listening on port 25 but has come back with a FILTERED status indicating this port is likely blocked by a firewall system.
Additional feedback will be given if a PortQry is successful - depending on the port queried.
Comments
0 comments
Article is closed for comments.