6

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.

user9517
  • 115,471
  • 20
  • 215
  • 297
c_oreills
  • 63
  • 1
  • 3

1 Answers1

7

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.

MadHatter
  • 79,770
  • 20
  • 184
  • 232
  • 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 06 '11 at 15:19