Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to see if traffic gets through on a specific port on another machine. Is there a simple way to test for this?

share|improve this question
Sorry I should have specified, a port to another machine – Matt Jul 2 '09 at 18:02
I added that to your question. If I misunderstood, post another comment and I can fix it for you. – Thomas Owens Jul 2 '09 at 18:04

9 Answers

up vote 15 down vote accepted

I found a hiddem gem the other day from Microsoft that is designed for testing ports:

Portqry.exe

"Portqry.exe is a command-line utility that you can use to help troubleshoot TCP/IP connectivity issues. Portqry.exe runs on Windows 2000-based computers, on Windows XP-based computers, and on Windows Server 2003-based computers. The utility reports the port status of TCP and UDP ports on a computer that you select. "

share|improve this answer
This is not installed by default. So the answer is "NO" Microsoft have removed any way of checking if a port is open on a remote machine without installing something extra. Surely this is something server users need all the time?!! I don't want to have to install telnet or portqry on every server :-( – mjaggard Aug 17 '12 at 9:45

Use the telnet command to connect to the server on the specified port, and see if a connection can be established.

Success:

$ telnet my_server 25
220 my_server ESMTP Postfix

Fail:

$ telnet my_server 23632
Connecting To my_server...Could not open connection to the host, on port 23632:
Connect failed
share|improve this answer
doesn't work for UDP. – Adriano Varoli Piazza Jul 2 '09 at 20:23

Telnet will work for TCP.

Netcat is a better tool for these sorts of things, including UDP, watch out though, some AV softwares consider it an 'evil hacker tool'

share|improve this answer

There's not a way*.

*If it's a TCP port, you can attempt to use telnet to connect to that port.

If it's UDP, there's nothing built in.

This is also not programming related.

share|improve this answer
7  
Not programming related? So? This ain't SO. – Adriano Varoli Piazza Jul 2 '09 at 20:23

the following command will list all ports in use on the machine...

netstat -a

The output contains the protocol, local address, foreign address and current state

Netstat documentation on microsoft.com

share|improve this answer

telnet <ipaddress> <portnumber>

Fill in the address/port. If you connect, you know the port is open, assuming it's a TCP service.

You could also use nmap to see all of the open ports on a given machine.

share|improve this answer

You could try telnet:

telnet <ipaddress> <port>
share|improve this answer

Many tools for running the test have been discussed but note that there has to be a clear path between the host running the test and the target. Firewalls or other software limiting by port or IP address, for example, on either of the machines or any intervening devices may cause the test to fail.

share|improve this answer

'netstat' is you friend.

share|improve this answer
Local machine yes, remote machine no. – Joe Jul 2 '09 at 18:04
This answer was posted before the edit that specified that it's about a port on remote machine. – quosoo Jul 2 '09 at 18:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.