Hot Deals: Sweet Valentine Gifts at Sweet Prices | Amazon Kindle DX | Nokia N900 | Nokia E72 | Browse Full Store

How to Create a Chat Server with Netcat

by Chinmoy Kanjilal | Translate | Print
Thursday, 29th Oct 2009 | Share






Share How to Create a Chat Server with Netcat on Twitter Share How to Create a Chat Server with Netcat on Facebook Save How to Create a Chat Server with Netcat To Delicious Favorites Stumble How to Create a Chat Server with Netcat Share How to Create a Chat Server with Netcat on Digg Get Instant Updates as RSS Feeds from Techie Buzz

Netcat is a very powerful network utility for Linux. Netcat was developed in 1995 and has many advanced usages. It featured as one of the Top 100 network security tools of 2006 at rank #4.With netcat, we can perform numerous networking tasks like port scanning, managing connections and setting up servers. One very basic usage of netcat is shown here.

Create a chat server/Client:

Netcat can be used to create a chat server and client. With netcat, we can setup a computer as a chat server and another as a chat client which would connect to that server. This enables chatting between two computers on a network.

To create a chat server, enter this into a terminal:

nc –l –p ‘port_number’

This will set up a tcp server on the host at the port specified as ‘port_number’. This makes netcat listen to the specified port and relays the incoming message on the terminal with stdout. Connect to the chat server using:

nc ‘server_ip’ ‘port_number’c

Now, any connection made to the server on the specified port will set up a chat client through the terminal with stdin.

If you are on a Mac, use only the –l switch to create a chat server. So, your command should look like:

nc –l ‘port_number’

Connecting to the chat server on a Mac is the same as given above.

Liked this post? Have a Question? Comment and share your opinions and views with us

Get Regular Updates. Subscribe to Free RSS Feeds or Email Updates. Click to expand subscription options

No Responses so far | Leave Your Comments

Comments are moderated. Please try and stay on topic. Please do not use abusive language, if you think there is a problem, please email the post author or use the contact us form to tell us about it.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>





Better Tag Cloud