Trying to understand iptables



Hello gurus,

I'm playing around with the SSH throttling examples from debian-administration.org. I'm still a bit new to iptables, and I'm trying to understand how this works.

I have the following two commands:

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


Which tells the kernel to allow 3 new ssh connections from a single remote host, and after that the remote host is blocked by dropping the packets. My question is, for how long is the remote host blocked? Another 60 seconds?

Or to put it another way, how does iptables know how long to remember a recent connection? And can I change that?

Michael


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: NFS problem - coulid it be iptables?
    ... I was able to mount NFS filesystems after I worked my way through iptables issues. ... Can you 'ping snider' successfully from the remote host? ... daemons running. ...
    (comp.os.linux.misc)
  • Telnet is not working with iptables
    ... i want to open specific port using iptables i.e 3159 ... Whenever i tried to telnet it generates the following error ... telnet: Unable to connect to remote host: No route to hostbut when I stopped iptables ...
    (RedHat)