ott 15 2008

Bloccare Spammers/Hackers com mod_spamhaus su Apache2

Published by Dev at 15:52 under Opensource, Sicurezza, Tutorial

mod_spamhaus è un modulo di apache che sfrutta le DNSBL permettendo di bloccare spam relay via web forms, prevenire URL injection,http DDoS attacks fda bots ecc.

1. Scarichiamo il pacchetto Tgz

wget http://kent.dl.sourceforge.net/sourceforge/mod-spamhaus/mod_spamhaus05.tar.gz

2. Scompattiamo e compliliamo:

tar zxvf mod_spamhaus05.tar.gz
cd mod-spamhaus
make[...]

make install

3. Aggiungiamo il modulo di spamhouse nel file di configurazione di Apache:

joe /etc/apache2/httpd.conf

[...]
LoadModule spamhaus_module /usr/lib/apache2/modules/mod_spamhaus.so

4. Direttive del modulo

Le direttive supportate da mod_spamhaus sono le seguenti:
MS_Methods – If the httpd’s method used by the visitor match, module verify user’s ip address
MS_WhiteList – A simple whitelist file where you can put ip address to bypass
MS_DNS – DNSBL to use. Usefull if you want make a local rbldnsd instance
MS_CacheSize – Number of cached addresses

A queto punto aggiungiamo direttamente la direttiva nel file di configurazione di apache:

joe /etc/apache2/apache2.conf

[...]

MS_METHODS POST,PUT,OPTIONS,CONNECT
MS_WhiteList /etc/spamhaus.wl
MS_CacheSize 256

[...]

Poi creiamo il file whitelist vuoto:

touch /etc/spamhaus.wl

A questo punto facciamo ripartire apache. Fine!!

Articoli Correlati:

Segnala presso:
  • del.icio.us
  • Google
  • Live
  • Segnalo
  • Slashdot
  • Facebook
  • Upnews
  • Wikio IT
  • Digg
  • E-mail this story to a friend!
  • Ma.gnolia
  • MySpace
  • Diggita
  • LinkedIn
  • OKNotizie
  • ZicZac

No responses yet



Trackback URI | Comments RSS

Leave a Reply