Install and Configure the Spamhaus Apache Module on Debian/Ubuntu

The Spamhaus Apache module enables you to block attackers by denying requests from a blacklist of IP addresses that are known to be bad. This module is in Debian and Ubuntu’s default repositories.

Install the Spamhaus Apache module:
# sudo apt-get install libapache2-mod-spamhaus

You can configure the module to filter based on a number of different criteria. With the “MS_METHODS” definition, you can check the IP whenever the client uses any of the module’s recognized HTTP methods. This can prevent flooding of your web server. The module also allows you to configure a whitelist, maintain a local version of the DNS blacklist, and adjust cache parameters.

Edit the module’s config file to set your preferred parameters:
sudo vim /etc/apache2/mods-available/mod-spamhaus.conf

Check to make sure the module is enabled:
# sudo a2enmod mod-spamhaus

Reload Apache config to allow the changes to take effect:
# sudo service apache2 reload

pixelstats trackingpixel

Copyright © - 2018 VinnyMac Technologies. All Rights Reserved.