On Friday 29 January 2010 12:06:25 Michael Goffioul wrote:
> Hi,
>
> When creating a local port forwarding with SSH (using the -L command flag),
> is it possible to limit the number of clients that will be able to connect
> to the local port?
>
> Let's say I do:
>
> ssh -L 0.0.0.0:36725:localhost:7777 u...@hostname
>
> Can I limit the number of accepted clients on port 36725?
Not with ssh, but you can achieve the same result with iptables:
iptables -A INPUT -p tcp --syn --dport 36725 -m connlimit \
--connlimit-above 2 -j REJECT
HTH
Dominique
--
http://config-model.wiki.sourceforge.net/ -o- http://search.cpan.org/~ddumont/
http://www.ohloh.net/accounts/ddumont