Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Iptables: Recent update with hitcount

2 views
Skip to first unread message

Tanja Kalies

unread,
Aug 3, 2009, 8:36:44 AM8/3/09
to
Hello together,

I would like to stop unauthorized attempts to log on my sshd server via
the following IPtables rule:

iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m
recent --set
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m
recent --update --seconds 60 --hitcount 4 -j DROP


As far as I understand iptables, it should generate a timer that drops
new connection attemps as long as there are 4 attempts within 60 seconds.

But when I try from an external ip, I can try to connect as often as I
want and don't get dropped :-(

Is there anything wrong with the syntax?
Thanks for any help!
Tanja

0 new messages