Manual:$wgSysopRangeBans

Details
Allow sysops to ban IP ranges

To use this in later versions of MediaWiki, add the following to your LocalSettings.php: $wgBlockCIDRLimit = array( 'IPv4' => 32, 'IPv6' => 128 );