Enable Local Chat inside the Network with Netcat (NC) Linux Command

By | February 10, 2011

Using internet to chat with your friends who are in the same company is always a risky thing. Fortunately I don’t have that problem in our company as I have unlimited access to internet. But, if you work on linux machines and you have similar problem chating with friends, then you might probably want to chat to ur friends on the local lan. Here is how you can do it using netcat (nc) linux command.

First things first. A server has to open up a connection with a non reserve port which is not used by any of the services. Check out your /etc/services to find the ports that are running on your machine. So, here is how you can do it.

nc -l 12345

Here 1234 is my port number and It would work perfectly good.

You should now connect to the server from the other machine, which I can call it as a client. Now, let me imagine that the server ip address is 10.0.1.10

nc 10.0.1.10 12345

Once you enter this command, you should now be able to chat with your friend who is sitting on the server. If you have problem connecting, then you should probably do try it again. Please note that it works perfectly fine most of the times as no firewall binds the local network. Be careful if you have a network monitoring enabled on your lan. These packets are not captured most of the times, but always stay on the safe side.

If you like this article, then please consider sharing it. Sharing really inspires us to do things much better!!

Leave a Reply

Your email address will not be published. Required fields are marked *