Secure Shell
Re: Port forwarding and access restriction Feb 01 2010 01:08PM
Dominique Dumont (domi komarr gre hp com)
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 user@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


-- -o-

[ reply ]


Privacy Statement
Copyright 2010, SecurityFocus