Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried using ncat (a “much-improved reimplementation of netcat”) to chat with a friend (and ultimately want to send a large file, but I know I can get that working once I get chat to work).

We both have Windows.

On my end I typed:

ncat -l 3333

On his end I had him type:

ncat [my public IP] 3333

Nothing happened on my end, while his completed with "Ncat: ." and returned to the prompt.

I couldn't figure out what to do to fix this, so I decided, while he's busy, I'll test this out on two of my own laptops (one with Windows, the other with Linux, not sure if it should matter).

I found the same results ("Ncat: ." then back to prompt) only when I issued

ncat -l 3333

from Linux and

ncat [my public IP] 3333

from Windows.

The only scenario in which the chat/file-transfer did work was when I listened from Windows and did ncat [my public IP] 3333 from Linux.

Any ideas why this is happening, and what I can do to fix it?

share|improve this question

migrated from Mar 5 '13 at 7:36

This question came from our site for professional and enthusiast programmers.

You did not tell wether it's working or not. At the moment, you don't like the blinking cursor. That's all you've told. Please give us more information of what works and what doesn't. And I suggest you portforwarding, if the connection could not be established. – Peter Mar 5 '13 at 7:50
@Peter: Read it again. He’s saying that the client process exits immediately upon being started. – Scott Mar 5 '13 at 20:53
Emil: Have you tried -v (and -vv and -vvv)? Do you have a sniffer (e.g., ethereal, Wireshark, tcpdump, …)? Can you see what is happening on the wire? – Scott Mar 5 '13 at 20:54
yes, I have Wireshark. I can try taking a look, but it is a little overwhelming, and I'm not sure what to look for. I took my first Routing/networking class last semester, so I'm new to this. I'll check though and see if anything looks...::ahem:: familiar – Emil Mar 6 '13 at 3:18
up vote 1 down vote accepted

Check that there are no firewalls in the way (to check in Wireshark, verify that a TCP SYN packet arrives at the listening instance) and check that port forwarding is properly set up if you are accessing the internet through a firewall or home router. If you aren't getting a TCP SYN packet, work your way back to the originating machine until you see where it stops. If you see a TCP SYN packet incoming followed by an outgoing TCP SYN/ACK packet, make sure that packet is arriving at the originating node, and that it responds with a TCP ACK.

Based on the fact that it works when listening from Windows and ncatting in from Linux, I would check the personal firewall settings for the firewalls on both Linux and Windows and see if they are configured differently. Make sure you allow incoming traffic on the port you are listening on (in this case 3333).

One difference that exists with real Netcat between Linux and Windows is that in Windows there is a -L flag that causes persistent listening after a closure. This may not have anything to do with this issue, but I thought it was worth mentioning.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.