Iptables : Limit the number of ssh connections

Valic —  November 4, 2010 — 1 Comment

Just use the following command:

iptables -A INPUT -p tcp --syn --dport 22 -m connlimit --connlimit-above 5 -j REJECT

In this example our connections are limited to 5.

Valic

Posts Twitter Facebook

Editor in Chief at Debian-Tutorials, Linux enthusiast.

One response to Iptables : Limit the number of ssh connections

  1. Nice site, nice and easy on the eyes and great content too.

Leave a Reply