Yes, you can get the published IP address ranges for a country, and block them using a .htaccess filter, or iptables if you control of the server.