I am also interested in such an anti-hacker approach to banning offending IP addresses based on their continued attempts to login to phpadmin, mysqladmin, etc.
You can do it in BSD.
Try bruteblock in the ports. It can monitoring the log of a service, like ftp, ssh.
If the Ip logged to be error login, for how many time you specify in any hour / day, you can block it for as long as you want.