Extension: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. IPv6 addresses are accepted by the block form, but the blocks are not effective and do not show up in the list of global blocks, unless you change the default schema of your global blocking database.

Installation instructions
Download the latest snapshot and extract it to your extensions directory.

Add this line to LocalSettings.php: You will also need to set up a 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 globalblocking.sql. For IPv6 support, change each 32 in globalblocking.sql to 35 or larger.

You also need to import the SQL schema in localdb_patches/setup-global_block_whitelist.sql to each of your local wiki databases.

API
GlobalBlocking adds an API list module "globalblocks" to list globally blocked IP addresses. It is not possible to do the actual blocking via the API.


 * Parameters
 * : The timestamp to start enumerating from
 * : The timestamp to stop enumerating at
 * : The direction in which to enumerate (older, newer)
 * : Pipe-separated list of block IDs to list (optional)
 * : Pipe-separated list of addresses to search for (optional)
 * : Get all blocks applying to this IP or CIDR range, including range blocks. (Cannot be used together with bkusers. IPv4 CIDR ranges broader than /16 are not accepted; however, IPv6 ranges can be of any size, but IPv6 blocks are unsupported.)
 * : The maximum number of blocks to list
 * : Which properties to get (id|address|by|timestamp|expiry|reason|range)


 * Example

Usage
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: To remove a global block:
 * 1) Go to Special:GlobalBlock
 * 2) Enter the IPv4 address or range (up to /16) that you wish to block (or any IPv6 address or range if you made the schema changes prescribed in the installation instructions section of this page), and decide if you want to only block anonymous users. To only block anonymous users, check the checkbox. Note that Wikimedia tends to avoid hard global blocks due to the danger of collateral damage.
 * 3) 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, and the blocked IP or range cannot edit any associated user talk pages on any wiki affected and opted in to the global block.
 * 1) Go to Special:GlobalBlockList and click "Remove a global block"
 * 2) Enter the IP address or range to unblock and the reason, and submit the form. The IP address or range is no longer globally blocked.