cv71wa
Last Updated: February 25, 2016
·
1.586K
· rodnaph
6e283a554e50ee3d10e5386f85816463

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.

Say Thanks
Respond

3 Responses
Add your response

6460
Aar

Useful, thanks!

over 1 year ago ·
10641
44c6fcfb46945625463e1847e1dca048

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

over 1 year ago ·
15151
Caf1e62edfd81c4e7dab7ab6da8d7cda normal

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

over 1 year ago ·