Extension:IPInfo - MediaWiki (original) (raw)

MediaWiki extensions manual

IPInfo Release status: beta
Author(s) Product Safety and Integrity, Wikimedia Foundation
Latest version 0.0.0
Compatibility policy Snapshots releases along with MediaWiki. Master is not backward compatible.
Database changes Yes
Parameters wgIPInfoMaxDistinctIPResultswgIPInfoMaxDistinctIPResults wgIPInfoMaxDistinctIPResultswgIPInfoGeoIP2EnterprisePath $wgIPInfoGeoLite2Prefix
Added rights ipinfo ipinfo-view-basic ipinfo-view-full ipinfo-view-log ipinfo-view-arbitrary-ip
Hooks used BeforePageDisplay GetBetaFeaturePreferences GetPreferences GlobalPreferencesSetGlobalPreferences LoadExtensionSchemaUpdates LocalUserOptionsStoreSave SpecialContributionsBeforeMainOutput SpecialPageBeforeExecute SpecialPage_initList
Licence MIT License
Download Download extension Git [?]: Browse repository (GitHub) Gerrit code review Git commit log Download source tarball
Translate the IPInfo extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

The IP Info extension is a feature for displaying IP information to help trusted users in their anti-vandalism workflows. The IP Info feature is maintained by the Product Safety and Integrity team (previously Trust and Safety Product) and was built as part of the Temporary Accounts project.

Warning Warning: Most functionalities of this extension requires paid data from MaxMind and Spur. Such data are also subject to additional usage restrictions defined by their providers.

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

[edit]

The IP Information feature is available to users who have the ipinfo right. To grant this right to all administrators on your wiki, add the following to LocalSettings.php:

$wgGroupPermissions['sysop']['ipinfo'] = true;

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 LocalSettings.php:

$wgGroupPermissions['sysop']['ipinfo-view-basic'] = true

Gives the user the right to view some IP information.

$wgGroupPermissions['sysop']['ipinfo-view-full'] = true;

Gives the user the right to view full IP information.

$wgGroupPermissions['sysop']['ipinfo-view-log'] = true;

Gives the user the right to view logs on IP information.

Enabling the extension

Step 1:

screenshot

Accessing IPInfo extension through Beta Menu

Step 2:

screenshot

User profile tab

screenshot

IPInfo checkbox

Utilizing the extension

screenshot

IPInfo Search Form

screenshot

IPInfo Enable User Agreement

screenshot

IP Information

screenshot

No Edits from IP

screenshot

IP information pop-up on logs page

screenshot

IP information pop-up on View History page

screenshot

IP information error no data on logs page

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

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 $wgIPInfoGeoLite2Prefix variable to the path to the directory containing the .mmdb files, plus the prefix GeoLite2-. Do this by adding the following to LocalSettings.php:

wgIPInfoGeoLite2Prefix=′wgIPInfoGeoLite2Prefix = 'wgIPInfoGeoLite2Prefix=pathToDir/GeoLite2-';

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.

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 $wgIPInfoGeoIP2EnterprisePath variable to the path to the directory containing the .mmdb files. Do this by adding the following to LocalSettings.php: wgIPInfoGeoIP2EnterprisePath=′wgIPInfoGeoIP2EnterprisePath = 'wgIPInfoGeoIP2EnterprisePath=pathToDir';

replacing $pathToDir with the path to the directory containing the .mmdb files. Note that, unlike with the free data, you should not include a prefix.

See also wikitech:Service/IPoid for details of Wikimedia's IPoid installation.

Spur is a proxy and VPN detection tools, and IPoid provides integration of IPInfo and Spur. If you have IPoid installed you can config IPInfo to use it via $wgIPInfoIpoidUrl. Note Spur's data feed is non-free and therefore Wikimedia's IPoid installation is not open for third party to use.

Setting name Default value Description
$wgIPInfoGeoLite2Prefix false Path to the directory containing GeoIP2 database files, plus the prefix GeoLite2-
$wgIPInfoGeoIP2EnterprisePath false Path to the directory containing GeoIP2 Enterprise database files
This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page.
This extension is included in the following wiki farms/hosts and/or packages: Miraheze Telepedia