Not sure if it's the best way, but you could use .htaccess to restrict IP ranges belonging to certain countries:
ex.
<Limit GET HEAD POST>
order allow,deny
deny from 203.31.234.0/24
deny from 51.0.0.0/8
deny from 199.103.64.0/22
deny from 199.103.82.0/23
deny from 199.103.86.0/24
deny from 199.103.114.0/23
deny from 199.103.116.0/23
deny from 199.185.139.0/24
etc..
allow from all
</LIMIT>