如何从WHOIS服务器获取IP地址范围的国家列表? [英] How to get list of countries IP Address ranges from WHOIS server?

查看:184
本文介绍了如何从WHOIS服务器获取IP地址范围的国家列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从IANA的whois服务器获取所有国家/地区的IP地址,而不是从maxmind或ip2location站点获取. IANA是真实的网站,因此我想从该网站获取国家/地区的所有ipaddress范围.可以通过这种方式查询WHOIS服务器吗?

I want to get all countries ip addresses range from IANA's whois server, Not from maxmind or ip2location site. IANA is authentic site hence I would like to get all ipaddress ranges for countries from that site. Is it possible to query the WHOIS server such a way??

推荐答案

不可能直接获得分配给任何国家的IP地址. IP号已分配给区域Internet注册表.

Its not possible to directly get the ip addresses allotted to any country like that. IP numbers are allocated to regional internet registries.

其中有5种,分别是ARIN,APNIC,AFRINIC,LACNIC,RIPE

There are 5 of them , ARIN , APNIC , AFRINIC , LACNIC , RIPE

同样,这些RIR分配的IP范围是一个国家的ISP.

And again , these RIR allot ip ranges to ISPs of a country.

通过执行Whois查询IP,您可以找出分配给IP的RIR. Whois响应还将包含该IP地址的国家和ISP.

By doing a whois query for an ip you can find out which RIR is the IP allocated to. The whois response will also contain the country and ISP of the ip address.

基本上,您需要Whois查询所有IP范围并聚合数据并形成数据库.这样的数据库可以用来提供属于某个国家的所有IP地址.

Basically you need to whois-query all ip ranges and aggregate the data and form a database. Such a database can be then used to provide all ip addresses belonging to a certain country.

这篇关于如何从WHOIS服务器获取IP地址范围的国家列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆