查询ISDB/地理位置信息
用户可以从ISDB库/GEO库中查找IP地址所属ISDB以及地理位置信息。返回的IP地址信息包括所属ISDB、位置、信誉和其他服务信息。
通过GUI查询
GUI方式查询需FortiOS 7.2及更高版本支持。
进入“策略&对象→Internet服务数据库”,点击“IP地址查找”按钮,填写IPv4地址,可以查找到该IP所属的ISDB信息以及地理位置信息。
查找一个不属于ISDB库的IP地址,也可以显示地理位置信息。
同时也支持IPv6的查询。
通过CLI查询
查询对应流量所属的ISDB,可以查询更精细的协议和端口。
diagnose internet-service info <vdname> <protocol> <port> <ip>
FortiGate # diagnose internet-service info root 6 443 110.242.68.4 Internet Service: 2883585(Baidu-Web) country(156 China) region(688 Hebei) city(1692 Baoding)
查询某个ISDB ID包含的资源库具体列表,这里以Google.Web(65537)为例。
diagnose internet-service id 65537
查询某个ISDB的汇总信息,这里以Google.Web(65537)为例。
FortiGate # diagnose internet-service id-summary 65537 Version: 00007.03214 Timestamp: 202305221646 Total number of IP ranges: 1192387 Number of Groups: 24 Group(0), Singularity(90), Number of IP ranges(2877) Group(1), Singularity(89), Number of IP ranges(273689) Group(2), Singularity(88), Number of IP ranges(49676) Group(3), Singularity(87), Number of IP ranges(22743) Group(4), Singularity(86), Number of IP ranges(16913) Group(5), Singularity(85), Number of IP ranges(29777) Group(6), Singularity(84), Number of IP ranges(5120) Group(7), Singularity(83), Number of IP ranges(1290) Group(8), Singularity(82), Number of IP ranges(266) Group(9), Singularity(80), Number of IP ranges(93) Group(10), Singularity(20), Number of IP ranges(886) Group(11), Singularity(19), Number of IP ranges(990) Group(12), Singularity(18), Number of IP ranges(7498) Group(13), Singularity(17), Number of IP ranges(5855) Group(14), Singularity(16), Number of IP ranges(10700) Group(15), Singularity(15), Number of IP ranges(129919) Group(16), Singularity(11), Number of IP ranges(412) Group(17), Singularity(10), Number of IP ranges(197733) Group(18), Singularity(9), Number of IP ranges(8129) Group(19), Singularity(8), Number of IP ranges(3857) Group(20), Singularity(7), Number of IP ranges(46816) Group(21), Singularity(6), Number of IP ranges(183359) Group(22), Singularity(5), Number of IP ranges(184276) Group(23), Singularity(4), Number of IP ranges(9513) Internet Service: 65537(Google-Web) Number of IP ranges: 22984 Number of IP addresses: 19527487 Singularity: 6 Icon Id: 1 Direction: dst Data source: isdb
通过本地GEO库查询某个IP的地理位置信息。
FortiGate # diagnose internet-service id 65537 | grep 8.8.8.8 FortiGate # diagnose geoip ip2country 61.149.143.226 61.149.143.226 - China, is not anycast ip
通过FortiGuard GEO库查询某个IP的地理位置信息(需要FortiGate可以连接到Internet),查询到的地理位置信息更为详细。
FortiGate # diagnose geoip geoip-query 61.149.143.226 IP:61.149.143.226 { "city":{ "geoname_id":10175057, "names":{ "en":"Beijing" } }, "continent":{ "code":"AS", "names":{ "en":"Asia" } }, "country":{ "iso_code":"CN", "names":{ "en":"China" } }, "subdivisions":[ { "names":{ "en":"Beijing" } } ], "location":{ "latitude":39.904202, "longitude":116.407402, "time_zone":"Asia\/Shanghai" } }