Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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'm trying to use netcat to debug SIP calls, which communicate over UDP.

Is there a way to get the same netcat instance to listen to multiple UDP Connections? I've tried connecting to the same netcat session from two different hosts and the second is always unable to connect, even when I send an EOF from the first.

I'm aware that UDP "Connection" is a misnomer and that no such thing exists, am I thinking about this in the wrong way?

I'm version agnostic as I have both OpenBSD and Ubuntu "traditional" (GNU Debian) netcats installed.

I've tried the -k flag in OpenBSD to no avail.

Any ideas are appreciated.

share|improve this question
up vote 4 down vote accepted

The author of the ncat tool, in his page for netcat users notes that:

By default, Ncat will accept 100 simultaneous connections, instead of 1 like the original netcat. Use -m to specify the maximum number of simultaneous connections.

I rather suspect this means that netcat won't do what you want, but there's a simple drop-in replacement tool which will.

share|improve this answer
Thank you, that's a really useful upgrade. I've used it's --sh-exec option to get somewhere near where I want, but unfortunately in listen mode lots of background ncat instances are getting left running. Next question! – c_oreills May 6 '11 at 15:19

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.