Ensure that the regexblock user right is given to a group that exists; by default this user right is given to the staff user group (which does not exist in a default MediaWiki installation). For example, this could be given to the sysop group:
User right required to view and thus use Special:RegexBlock for managing blocks.
Users who have this right are exempt from RegexBlock blocks.
Go to Special:RegexBlock
Enter the IP address or the username to be blocked to the "IP address or username" field
Enter an optional reason. If no reason is provided by the blocker, a generic reason will be shown to the blocked user.
Select expiry time
Select if you want to block the creation of new accounts and if the match needs to be exact or regex one
Press "Block this user"
Displayed to regexblocked users in the regexblock-reason-* interface messages. You might want to customize it if the ContactPage extension isn't installed on your wiki.
Set this to the database to use for blockedby and stats_blockedby tables. If you want to use the local database, set this to false. Otherwise you could set this to $wgSharedDB, for example.
To block all users except local ones (192.168.xx.xx): \b(25[0-5]|2[0-4][0-9]|?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|?(|[2-9])[0-9]?)\.(25[0-5]|2[0-4][0-9]|?[0-9][0-9]?)\b