AWStats is a widely used tool for creating website usage statistics. For gathering country stats you have two options in AWStats:
- using reverse dns lookup on the IP addresses
- use a Geo-IP database
Without the usage of plugins only IPv4 is supported. IPv6 support is only available with a plugin, however, only for performing reverse IPv6 lookups and not for the GeoIP plugin.
If you want to use my patch you need the Maxmind Geo(Lite) Country IPv6 database (the IPv4 database seems to be included) and the Geo-IP perl package in version >= 1.40 (libgeo-ip-perl in Debian 6; 1.40 is available in Squeeze backports). DNSLookups should be disabled.
Update 2014-02-08: This patch was included into the official development branch.