If you need to block an IP address from accessing a directory on your site, place the following into an .htaccess file located in the directory you wish to block their access from:
Order Allow,Deny Allow from all Deny from 111.111.111.111
Replace 111.111.111.111 with the IP you wish to block. If you need to block more than one ip:
Order Allow,Deny Allow from all Deny from 111.111.111.111 Deny from 222.222.222.222
or:
Order Allow,Deny Allow from all Deny from 111.111.111.111 222.222.222.222
If you wish to deny access to an entire block of IPs, only give a portion of the IP:
Order Allow,Deny Allow from all Deny from 111.111