网络安全系列-二十六: IP地理定位数据库及使用示例
2023-09-11 14:16:24 时间
GeoLite2数据库
GeoLite2数据库是免费的IP地理位置数据库,详见参见:GeoLite2 Free Geolocation Data,比商业版的MaxMind’s GeoIP2 databases 的精度要低,针对国家、城市和ASN数据每周更新。
GeoLite2数据库的经纬度存在一定的误差,通过IP转换成的经纬度与真实地址相比较有些偏差,但是GeoLite2可以离线使用,而且数据还具有丰富性,基于GeoLite2定位IP所在的城市还是很准确的。
涉及概念:
ASN (Autonomous System Number)是由IANA分配给自治系统AS (Autonomous System)的唯一编号。
ip-location-db下载地址
以下梳理了提供 ip-location-db的下载地址:
- wp-statistics/GeoLite2-City 提供了针对
GeoLite2-City.mmdb.gz
的下载 - P3TERX/GeoLite.mmdb 提供针对MaxMind的GeoLite2国家、城市和ASN数据库的下载
- GeoLite2-ASN.mmdb
- GeoLite2-City.mmdb
- GeoLite2-Country.mmdb