Extension:IPInfo

The IP Info extension is a forthcoming feature for displaying IP information to help trusted users in their anti-vandalism workflows. The IP Information feature is being built by the Anti-harassment tools team as part of the IP masking project.

Features
The IP Information feature displays information about an IP address that would otherwise only be available from external tools.

Information buttons are added next to IP addresses on history pages, the Special:Log page, the Special:RecentChanges page and the Special:Watchlist page. Clicking on these buttons displays a popup with the information.

The same information is also added to the top of the Special:Contributions page for an IP address.

When a user views IP information from the information box or popup and when they enable or disable the IP Info extension using the Special:Preferences page, these activities are tracked on the Special:Log page.Users with assigned privileges can access the IP information log.

Granting rights to use the IP Information feature
The IP Information feature is available to users who have the  right. To grant this right to all administrators on your wiki, add the following to : Once a user has this right, they will also need to enable the feature via Special:Preferences by checking the checkbox in the IP Information section of the User profile tab.

Other rights are also available that allow a user to view basic, full and log information. To grant them add the following to : Gives the user the right to view some IP information. Gives the user the right to view full IP information. Gives the user the right to view logs on IP information.

Usage
Step 1:


 * Navigate to the top right corner of the page(you must be logged in) and click on the person and beta icons as shown.



Scroll through the list of extensions till you find the IP Information Extension.Enable or disable the extension by checking the box. Click the Save button to effect your changes as shown.
 * This action will redirect you to the Special:Preferences#mw-prefsection-betafeatures page with the Beta Features tab active.

Step 2:

1.Navigate to the Special:Preferences page and click on the User profile tab as shown.

2.Scroll to the IP Information section and check the box as shown

3.Doing this will enable you to see pertinent information about IP Addresses such as: city,country, regison, etc.as shown

Data
The IP Info extension currently supports displaying data from MaxMind's GeoIP2 databases. The databases must be added to your server, and the  configuration variable must be set to the patch for these files, including the common prefix of the filenames (see the test data example).

Free test data
For development environments, free test data is available from https://dev.maxmind.com/geoip/geoip2/geolite2/. Download these databases, and move all the .mmdb files into the same directory. Then set the   variable to the path to the directory containing the .mmdb files, plus the prefix. Do this by adding the following to LocalSettings.php: replacing $pathToDir with the path to the directory containing the .mmdb files.

Note that the test databases only have data for a few IP addresses. For IP addresses that are not in the test database, the data will appear as not available when you view the IP information.

Paid data
For development environments, we support the enterprise database data is available from https://www.maxmind.com/en/solutions/geoip2-enterprise-product-suite/enterprise-database and anonymous ip database https://www.maxmind.com/en/solutions/geoip2-enterprise-product-suite/anonymous-ip-database

Download these databases; GeoIP2 Anonymous IP(GZIP) and GeoIP2 Enterprise(ZIP) respectively. Extract them and move all the .mmdb files into the same directory.

Then set the  variable to the path to the directory containing the .mmdb files. Do this by adding the following to LocalSettings.php: replacing  with the path to the directory containing the .mmdb files. Note that, unlike with the free data, you should not include a prefix.