I have a desktop that servers as both my personal PC and a small HTTP, SSH and FTP server.

I would like to set up iptables to limit the number of connections to ssh and ftp. I had a friend do it befor and I can't rember how he did it (and I no longer talk to him so I cannot ask him.)

What I want it a rule for both port 21 (FTP) and 22 (SSH) that allows 1 connection per minue and drops the rest. It should also log to syslof is thats possable.

How do I do that?