For one of our drupal 6 site need to block a particular IP form drupal side. There are some module availble for drupal 7 but only few for drupal 6.
We can use goaway module for the above functionality.
Goaway is a simple light weight drupal 6 module. By using the same we can blacklist and whitelist IPs along with Separate permissions for (1) settings, (2) banning, and (3) unbanning
First need to download and enable the goaway module. You can use directly download the module [Goaway Module ]and add inside the module folder and enable the module and configure it.
Or else use drush command to download and enable the module.
Drush command: drush en --y goaway [this will automatically download and enable the module]
Use this path to ban an ip: admin/user/goaway
Use this path to add Redirect Destination for the IPs we backlisted : admin/settings/goaway
Also there is option to add permission for different roles [admin/user/permissions/goaway]
By using the above simple steps we can block any number of IPs