RBL check con Nagios: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
| Line 1: | Line 1: | ||
== | =Installazione pacchetto= | ||
==Debian >= Jessie== | |||
sudo apt-get install nagios-plugins-contrib | |||
==Debian < Jessie== | |||
* Scaricare il tar: | * Scaricare il tar: | ||
wget https://trac.id.ethz.ch/projects/nagios_plugins/ | wget https://trac.id.ethz.ch/projects/nagios_plugins/downnloads/check_rbl-1.3.0.tar.gz --no-check-certificates | ||
tar xvzf check_rbl-1.3.0.tar.gz | tar xvzf check_rbl-1.3.0.tar.gz | ||
| Line 9: | Line 12: | ||
-D --install=no \ | -D --install=no \ | ||
-A all \ | -A all \ | ||
--maintainer | --maintainer email@example.com \ | ||
--requires libnagios-plugin-perl,libreadonly-perl \ | --requires libnagios-plugin-perl,libreadonly-perl \ | ||
--pkgname nagios-plugins-rbl \ | --pkgname nagios-plugins-rbl \ | ||
| Line 17: | Line 20: | ||
* Eventualmente uploadarlo per signarlo | * Eventualmente uploadarlo per signarlo | ||
* Se si installa a mano: | * Se si installa a mano: | ||
sudo dpkg -i nagios-plugins-rbl libnagios-plugin-perl libreadonly-perl | sudo dpkg -i nagios-plugins-rbl libnagios-plugin-perl libreadonly-perl | ||
* Dal repository su cui lo si è caricato: | |||
sudo apt-get install nagios-plugins-rbl | |||
=Configurazione= | |||
* Disablitare l'interprete embedded di Nagios | * Disablitare l'interprete embedded di Nagios | ||
| Line 40: | Line 42: | ||
define command{ | define command{ | ||
command_name check-rbl | command_name check-rbl | ||
command_line $USER1$/contrib/check_rbl -H '$HOSTADDRESS$' -t 60 --extra-opts=check_rbl | command_line $USER1$/contrib/check_rbl -H '$HOSTADDRESS$' -t 60 --extra-opts=rbl@etc/nagios-plugins/check_rbl.ini | ||
#--extra-opts=check_rbl@/etc/nagios-plugins.ini -v -d | #--extra-opts=check_rbl@/etc/nagios-plugins.ini -v -d | ||
} | } | ||
| Line 46: | Line 48: | ||
define command{ | define command{ | ||
command_name check-rbl-address | command_name check-rbl-address | ||
command_line $USER1$/contrib/check_rbl -H '$ARG1$' -t 60 --extra-opts=check_rbl | command_line $USER1$/contrib/check_rbl -H '$ARG1$' -t 60 --extra-opts=rbl@etc/nagios-plugins/check_rbl.ini | ||
#--extra-opts=check_rbl@/etc/nagios-plugins.ini -v -d | #--extra-opts=check_rbl@/etc/nagios-plugins.ini -v -d | ||
} | } | ||
| Line 53: | Line 55: | ||
* Creare il file di configurazione contenente i server da testare: | * Creare il file di configurazione contenente i server da testare, OPPURE EDITARE QUELLO ESISTENTE: | ||
<pre> | <pre> | ||
cat | sudo tee -a /etc/nagios-plugins. | cat | sudo tee -a /etc/nagios-plugins/check_rbl.inti > /dev/null <<EOFile | ||
[check_rbl] | [check_rbl] | ||
server=dnsbl.ahbl.org | server=dnsbl.ahbl.org | ||
| Line 111: | Line 113: | ||
define service{ | define service{ | ||
use generic-service | use generic-service | ||
host_name | host_name server.example.com | ||
service_description RBL | service_description RBL | ||
check_command check-rbl | check_command check-rbl | ||
| Line 122: | Line 124: | ||
define service{ | define service{ | ||
use generic-service | use generic-service | ||
host_name | host_name server.example.com | ||
service_description RBL | service_description RBL | ||
check_command check-rbl-address! | check_command check-rbl-address!1.2.3.4 | ||
} | } | ||
</pre> | </pre> | ||
=Riferimenti= | |||
*[http://blog.matteocorti.ch/?tag=nagios Teo's Blog » nagios] | *[http://blog.matteocorti.ch/?tag=nagios Teo's Blog » nagios] | ||
*[https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_rbl check_rbl – nagios_plugins] | *[https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_rbl check_rbl – nagios_plugins] | ||
| Line 137: | Line 139: | ||
*[http://freshmeat.net/projects/nagioscheckbl/ nagios-check_bl is a Nagios plugin that checks whether a server is in any known anti-spam block lists] | *[http://freshmeat.net/projects/nagioscheckbl/ nagios-check_bl is a Nagios plugin that checks whether a server is in any known anti-spam block lists] | ||
*[http://nagioswiki.com/wiki/index.php/Checking_Blacklisted_MTAs_with_CentOS_%2B_check_bl Checking Blacklisted MTAs with CentOS + check bl - Nagios Wiki] | *[http://nagioswiki.com/wiki/index.php/Checking_Blacklisted_MTAs_with_CentOS_%2B_check_bl Checking Blacklisted MTAs with CentOS + check bl - Nagios Wiki] | ||
[[Category: Published]] | |||
Revision as of 16:58, 30 March 2016
Installazione pacchetto
Debian >= Jessie
sudo apt-get install nagios-plugins-contrib
Debian < Jessie
- Scaricare il tar:
wget https://trac.id.ethz.ch/projects/nagios_plugins/downnloads/check_rbl-1.3.0.tar.gz --no-check-certificates tar xvzf check_rbl-1.3.0.tar.gz
- Creare il file .deb
sudo checkinstall \ -D --install=no \ -A all \ --maintainer email@example.com \ --requires libnagios-plugin-perl,libreadonly-perl \ --pkgname nagios-plugins-rbl \ --review-control
Quando si edita il file control alla fine, eliminare le ricghe vuote con Conflicts: e xxxx:
- Eventualmente uploadarlo per signarlo
- Se si installa a mano:
sudo dpkg -i nagios-plugins-rbl libnagios-plugin-perl libreadonly-perl
- Dal repository su cui lo si è caricato:
sudo apt-get install nagios-plugins-rbl
Configurazione
- Disablitare l'interprete embedded di Nagios
sudoedit /etc/nagios3/nagios.cfg ... enable_embedded_perl=0 use_embedded_perl_implicitly=0 ...
- Creare i comandi:
cat | sudo tee /etc/nagios-plugins/config/check_rbl.cfg > /dev/null <<EOFile
define command{
command_name check-rbl
command_line $USER1$/contrib/check_rbl -H '$HOSTADDRESS$' -t 60 --extra-opts=rbl@etc/nagios-plugins/check_rbl.ini
#--extra-opts=check_rbl@/etc/nagios-plugins.ini -v -d
}
define command{
command_name check-rbl-address
command_line $USER1$/contrib/check_rbl -H '$ARG1$' -t 60 --extra-opts=rbl@etc/nagios-plugins/check_rbl.ini
#--extra-opts=check_rbl@/etc/nagios-plugins.ini -v -d
}
EOFile
- Creare il file di configurazione contenente i server da testare, OPPURE EDITARE QUELLO ESISTENTE:
cat | sudo tee -a /etc/nagios-plugins/check_rbl.inti > /dev/null <<EOFile [check_rbl] server=dnsbl.ahbl.org server=cbl.abuseat.org server=dnsbl.cyberlogic.net server=bl.deadbeef.com server=spamtrap.drbl.drand.net server=spamsources.fabel.dk server=0spam.fusionzero.com server=mail-abuse.blacklist.jippg.org server=korea.services.net server=spamguard.leadmon.net server=ix.dnsbl.manitu.net server=relays.nether.net server=dnsbl.njabl.org server=bhnc.njabl.org server=no-more-funn.moensted.dk server=rbl.orbitrbl.com server=psbl.surriel.com server=dyna.spamrats.com server=noptr.spamrats.com server=spam.spamrats.com ; this keeps all zones of sorbs excl. spam server=dnsbl.sorbs.net server=spam.dnsbl.sorbs.net server=bl.spamcannibal.org server=bl.spamcop.net server=pbl.spamhaus.org server=sbl.spamhaus.org server=xbl.spamhaus.org server=ubl.unsubscore.com server=dnsbl-1.uceprotect.net server=dnsbl-2.uceprotect.net server=dnsbl-3.uceprotect.net server=db.wpbl.info server=access.redhawk.org server=blacklist.sci.kun.nl server=bl.technovision.dk server=dnsbl.kempt.net server=dnsbl.solid.net server=dul.ru server=forbidden.icm.edu.pl server=hil.habeas.com server=rbl.schulte.org server=sbl-xbl.spamhaus.org ; these are rather slow ;server=bl.csma.biz ;server=sbl.csma.biz EOFile
- Utilizzarlo come ad esempio in:
define service{
use generic-service
host_name server.example.com
service_description RBL
check_command check-rbl
}
oppure
define service{
use generic-service
host_name server.example.com
service_description RBL
check_command check-rbl-address!1.2.3.4
}
Riferimenti
- Teo's Blog » nagios
- check_rbl – nagios_plugins
- Extra-Opts | Nagios Plugins
- Multi-RBL Check | The Anti-Abuse Project
- Nagios RBL Check Plugin | FAQ - HowTos - Tipps - Tricks
- BLACKLISTALERT.ORG - Test if your IP or DOMAIN is listed in a spamdatabase
- nagios-check_bl is a Nagios plugin that checks whether a server is in any known anti-spam block lists
- Checking Blacklisted MTAs with CentOS + check bl - Nagios Wiki