Three ways to deal with troublesome users.

  1. Using a contributed module. Read more.
  2. Build in Drupal version 6 under admin/user/rules You must setup the appropriate access rule. You can find any user's IP address under admin/reports/dblog Search under the Message column for Session opened for User-Name-Here. Then click on this link. User's IP address is on the next page. If not working make sure that the Tracker core module is activated.
  3. At server level with HTACCESS. Read more.