Extension:GlobalBlocking
GlobalBlocking Release status: beta |
|
---|---|
![]() |
|
Implementation | Special page , User identity , API |
Description | Allows IP addresses to be blocked on multiple wikis |
Author(s) | Andrew Garrett (Werdnatalk) |
MediaWiki | 1.13-alpha and later |
Database changes | Yes |
Tables | globalblocks global_block_whitelist |
License | GNU General Public License 2.0 or later |
Download | |
|
|
|
|
Translate the GlobalBlocking extension if it is available at translatewiki.net | |
Vagrant role | globalblocking |
The GlobalBlocking extension allows a user with the appropriate permissions to block an IP address or IP address range (but not accounts) on all wikis in a group sharing the same globalblocking
database. It is intended to be used for combating severe cross-wiki vandalism and spam. Before revision 6899, IPv6 addresses were accepted by the block form, but the blocks were not effective and did not show up in the list of global blocks, unless the default schema of the global blocking database was changed (see below).
Installation instructions[edit]
- Download and place the file(s) in a directory called
GlobalBlocking
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php:
wfLoadExtension( 'GlobalBlocking' );
- You will also need to create a dedicated database for this extension to work. At a minimum (all wikis running on the same host), you need to create a local database called
'globalblocking'
(or specify a different name in$wgGlobalBlockingDatabase
), and grant all database users that your wikis run as full permissions on that database (at a minimum,SELECT, UPDATE, INSERT, DELETE
). - After creating the database, you should import the SQL from
globalblocks.sql
into the global blocking database. - You also need to run
update.php
on each of your local databases, or otherwise import the SQL schema inlocaldb_patches/setup-global_block_whitelist.sql
to them. Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
To users running MediaWiki 1.24 or earlier:
The instructions above describe the new way of installing this extension using wfLoadExtension()
.
If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of wfLoadExtension( 'GlobalBlocking' );
, you need to use:
require_once "$IP/extensions/GlobalBlocking/GlobalBlocking.php";
globalblocking.sql
to 35 or larger for IPv6 support. If you already have existing IPv6 global blocks, reblock those addresses for the change to take effect. Upgrading the extension past revision aa93ee537
will do this for you.Configuration[edit]
- $wgApplyGlobalBlocks
- Whether to respect global blocks on this wiki. This is used so that global blocks can be set on one wiki, but not actually applied there (i.e. so people can contest them on that wiki.)
- $wgGlobalBlockingBlockXFF
- The flag
$wgGlobalBlockingBlockXFF
, set totrue
by default, causes blocks to apply to all of the IP addresses in the X-Forwarded-For (XFF) header. Set this flag to false to disable this feature. For more details, see task 23343.
API[edit]
Two API modules are provided, one to (un)block users, and another to view existing global blocks. They are documented at Extension:GlobalBlocking/API
Usage[edit]
The following requires appropriate permissions, assigned by default to stewards, which by default can be added or removed by bureaucrats. To make a global block:
- Go to Special:GlobalBlock
- Enter the IPv4 address or range (up to /16) that you wish to block (or any IPv6 address or range up to /4 if you made the schema changes prescribed in the installation instructions section of this page or you have the latest revision), and decide if you want to only block anonymous users. To only block anonymous users, check the checkbox.
- Submit the form. The IP address or range is now globally blocked on your wikis that opt in to the global blocking. Account creation is blocked (even if you selected "anonymous users only": task 40190), and the blocked IP or range cannot edit any associated user talk pages on any wiki affected and opted in to the global block. If Extension:AbuseFilter is installed, globally blocked IP addresses are prohibited from viewing the abuse log if the particular wiki is opted in to the block.
To remove a global block:
- Go to Special:GlobalUnblock and click "Remove a global block"
- Enter the IP address or range to unblock and the reason, and submit the form. The IP address or range will no longer be globally blocked.
See also[edit]
![]() | 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. |
- Beta status extensions
- Special page extensions
- User identity extensions
- API extensions
- GPL licensed extensions
- Extensions in Wikimedia version control
- GetLogTypesOnUser extensions
- LoadExtensionSchemaUpdates extensions
- OtherBlockLogLink extensions
- SpecialContributionsBeforeMainOutput extensions
- SpecialPasswordResetOnSubmit extensions
- UserIsBlockedGlobally extensions
- UserMergeAccountFields extensions
- GetUserPermissionsErrorsExpensive extensions
- All extensions
- Extensions for data exchange with other local wikis
- Extensions used on Wikimedia