This guide explains how to set up mod_geoip with Apache2 on a Debian Etch system. mod_geoip looks up the IP address of the client end user.
Read it here
This allows you to redirect or block users based on their country. You can also use this technology for your OpenX (formerly known as OpenAds or phpAdsNew) ad server to allow geo targeting.