Often referred to as the "swiss army of knife" for TCP/IP networking, [Netcat] is an extremely versatile Linux utility that allows you to do anything under the sun using TCP/UDP sockets. It is one of the most favorite tools for system admins when they need to do networking related troubleshooting and experimentation.
In this tutorial, I am sharing a few useful netcat examples, although the sky is the limit when it comes to possible
netcat use cases. If you are using
netcat regularly, feel free to share your use case.
Note that when you are binding to well-known ports (0-1023) with
nc, you need root privilege. Otherwise, run
nc as a normal user.
1. Test if a particular TCP port of a remote host is open.
$ nc -vn 192.168.233.208 5000