Manual:$wgBadRanges/en

Details
User agent/range blocking. Blocks all users using a particular user agent, possibly restricted to a set of IP ranges.

This setting holds an array of arrays of IP addresses that each value in apply to.

e.g.