we can ban an ip address by cpanel but if some on havnt cpanel
he can denay any ip by htaccess
1-Block everyone but yourself

# Begin IP blocking #
Order Deny,Allow
Deny from all
Allow from xx.xxx.xxx.xx
# End IP blocking #

2-Allow everyone, but block Certain IPS
# Begin IP blocking #
Order Allow,Deny
Deny from xxx.xxx.xx.xxx
Deny from xxx.xx.x.xx
Allow from all
# End IP blocking #

3-another way would be to block the REQUEST, HTTP REQUEST., POST, GET ect
#Begin limit #
<Limit GET POST>
order allow,deny
deny from xx.xxx.xxx.xxx
deny from xx.xxx.xxx.xxx
allow from all
</Limit>
#End limit #