Geoipgen is an IPv4 network tool for generating geotargeted IP addresses. Features: Random or sorted order, unique or repeating ips, skips broadcast addresses, uses the MaxMind GeoLite Country database.
You can download it from the following link: https://packetstormsecurity.com/files/download/75594/geoipgen-0.3.tar.gz
Source: https://packetstormsecurity.com/files/75594/GeoIPGen-IP-By-Country-Generator.html