Limit concurrent connections

Wayne Marshall wcm at guinix.com
Sat Jun 17 03:19:13 WST 2006


On Fri, 16 Jun 2006 09:02:50 -0700
Rich Turner <rich at storix.com> wrote:

> I have looked through options.h and could not find where I could
> define the total number of concurrent client connections that are
> allowed to be connected to the dropbear server. I would like to limit
> the number of authorized connections to 1. Is this possible?
>

It is also possible to run dropbear under supervision with an external
listener that enables connection limits.  Such utilities include
daemontools + ucspi-tcp and runit + ipsvd.  Here is a run script
snippet that I use:

exec \
  chpst \
  -m 10000000 \
    tcpsvd -vv \
    -c $CONLIMIT \
    -C $CONPER \
    -l 0 \
    -x iprules.cdb \
    $IP $PORT \
        $DROPBEAR -d $DB_DSS_KEY -r $DB_RSA_KEY -i -E -g

Here $CONLIMIT may be defined to limit the total number of concurrent
connections, and $CONPER may be defined to limit the total number of
concurrent connections per IP address.

Wayne




More information about the Dropbear mailing list