I want to see if traffic gets through on a specific port on another machine. Is there a simple way to test for this?
|
|
I found a hiddem gem the other day from Microsoft that is designed for testing ports: "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. " |
||||
|
|
Use the telnet command to connect to the server on the specified port, and see if a connection can be established. Success:
Fail:
|
||||
|
|
|
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' |
||||
|
|
|
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. |
|||||
|
|
the following command will list all ports in use on the machine...
The output contains the protocol, local address, foreign address and current state |
||||
|
|
|
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. |
||||
|
|
|
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. |
||||
|
|
|
'netstat' is you friend. |
|||||
|