Ban users from their IP
The built-in IP blocking (at /admin/config/people/ip-blocking) works just fine, but if you're looking for some slightly more advanced functionality, like blocking ranges of IPs, I've used IP Ranges with a great deal of success:


  IP Ranges is a module that let's you completely ban both single IP-addresses as well as
  full ranges from your site. The ban is triggered already at the early bootstrap phase, so you
  can get rid of unwanted visitors as early as possible without wasting server resources.
  
  You can also define whitelists that override blacklists, both single and ranged.
  The UI is similar to core ip-ban, so you will feel like home immediately.