.htaccess to ban IP

In the .htaccess file add:

<Limit GET>
order allow,deny
allow from all
deny from xxx.xxx.xxx.xxx
</Limit>

Where xxx.xxx.xxx.xxx is the IP address you want to ban.

You can use * to define a range of IP’s: xxx.xxx.xxx.* or xxx.xxx.*.*

Ban more IP’s in .htaccess file:

order allow,deny
allow from all
deny from xxx.xxx.xxx.xxx
deny from yyy.yyy.yyy.*