Forum Moderators: phranque
If you are serious about "banning countries," then you will need to use a service such as GeoIP to find all of the current IP address ranges for those countries. IP addresses *are not* assigned on a country-by-country basis, and they change constantly. Therefore, in order to keep up with current address-range-to-country relationships, you will either need to use a 3rd-party service or hire a staff to track the daily changes.
Be aware that banning a single country without banning any others may require several hundred "Deny from" entries in your list, and will require constant monitoring for changes.
Jim
In case it is not clear, the "Order" directive sets the priority of "Allow" and "Deny." "Order Deny,Allow" means that "Denies" are processed first, but can be overridden by "Allows," whereas "Order Allow,Deny" means that "Allows" are processed first but can be overridden by "Denys." This is true without regard to the order of the individual "Allow" and "Deny" directives in your file; the order that you list them in does not matter at all.
Do not use "Allow from All" with "Order Deny,Allow" because that would mean that all "Denys" will be overridden by that "Allow."
Jim