Problem
Best described in T18068: New page: Special:Whois / Special:AboutIP
Proposed Solution
Extensions that have to do with a user's IP (such as CheckUser and MediaWiki-extensions-LoginNotify ) would benefit if we could show the "geolocation" of an IP address along with information about its "IP subnet". For instance, the IP address 8.8.8.8 belongs to Google Inc. and is located in Mountain View, CA, and it belongs to the IPv4 subnet 8.8.8.0/24.
- In case of CheckUser, if I retrieve results for a user and he has edits from 8.8.8.1, 8.8.8.2, 8.8.8.3, 8.8.8.11, etc, I would love to know that they are all from the same IPv4 subnet. Currently, CheckUser does not provide that information and I have to retrieve the data using third party resources.
- In case of LoginNotify, this extension warns me if I log in from a "new" IP address. It assumes that an IP address is "known" if it is within the same /24 subnet of my other known IPs. But this assumption is inaccurate as many IPs belong to wider subnets like /16 or /21 and I would like not to get false notifications in such circumstances.
There exists at least one service provider (https://ipinfo.io) that provides all the information we need for this task through an API (geolocation, ISP name, IP subnet, etc.) However, we need to obtain a license from them (both for legal reasons as well as the fact that IP sunbet data is not available for free through the API).
Alternatively, we can obtain the data in a single dump (not through an API). No matter how the data is retrieved, we would like to have an extension that simplifies obtaining, re-obtaining (e.g. every three months), storing, and returning this data.
Data source, retrieval and update are to be discussed in the parent task. This task focuses on technical aspects (DB schema, classes and methods, etc)