How do I get a list of IP addresses from a WHOIS server?

I want the IP addresses of all countries to vary from the IANA whois server, not from the maxmind or ip2location site. IANA is an authentic site, so I would like to get all ipaddress ranges for countries from this site. Is it possible to query the WHOIS server this way?

+2


a source to share


2 answers


The IANA does not have this information, so no, there is no way to get it from them.



IANA allocates large IP prefixes for RIRs (Regional Internet Registries). For example, 31.0.0.0/8 has just been allocated by the RIPE-NCC (by the way, one less than the IPv4 prefix, the time to turn on IPv6 if not already done), which covers all of Europe and a good part of the Middle East. So these addresses can go to Ireland, Jordan or Greece, and you can't tell from the IANA allocation. Even the RIR whois ( whois.ripe.net

for RIPE-NCC) will not give you enough details because the prefix can be assigned to the multinational IAP (Internet Access Provider).

+1


a source


It is not possible to directly get IP addresses allocated to any country. IP numbers are allocated to regional Internet registries.

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

And again, these RIR alot ip ranges for the country's ISPs.



By doing whois query for ip, you can find out which RIR is the IP address. The whois response will also contain the country and ISP's ip address.

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

+1


a source







All Articles