Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 3 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
add comment

Your Answer

 
discard

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.