cv71wa
Last Updated: February 25, 2016
·
2.499K
· rodnaph

Netcat to Test Connectivity

Need to test port connectivity between two hosts? Netcat to the rescue! Start the server on one host (port 1234 in this example)...

nc -l 1234

Then connect to it from the other host...

nc server-name 1234

Hopefully nothing should happen, but now anything you type into either end will be relayed to the other, showing the connection is ok.

3 Responses
Add your response

6460

Useful, thanks!

over 1 year ago ·
10641

If you want to log UDP specifically, try nc -lu 1234

over 1 year ago ·
15151

You can use the flag "-z" that closes the connection right after a successful attempt...

over 1 year ago ·