Checking your IP against RBLs in icinga2

To make sure that your IP is listed on any RBL you can implement a daily check in icinga2.

The check can be implement with the check_rbl script:

The script has a few perl module dependencies. To install them on a debian system execute:

Then download the script and make it executable:

Also download a copy of the configuration file:

Edit the configuration file and add/remove RBLs as needed. When writting this, the list still included the retired AHBL blacklist. To disable it comment the following line:

Now its time to start a test run:

The script will display all checked RBLs and exit with a Nagios status line:

Now add the command/service definitions to your icinga2 configuration and apply the rbl_address to your hosts definition.

Create /etc/icinga2/conf.d/check_rbl.conf with the following content:

Add the following service description to your /etc/icinga2/conf.d/services.conf:

And a rbl_address variable to all hosts you want to check:

Restart the icinga2 service and see the results in icinga-web.

4 Replies to “Checking your IP against RBLs in icinga2”

  1. Hi,

    I’m trying to get working your rbl checker under a centos 5.5
    The problem is that if I try it the best I can get is:
    perl check_rbl -t 60 –extra-opts=rbl@/etc/check_rbl.ini -H -v
    Can’t locate Data/Validate/ in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at check_rbl line 35.
    BEGIN failed–compilation aborted at check_rbl line 35.

    Have you please any idea how to get it work on centos?

    Many thenks for helping

    1. You’re system is missing the Data::Validate::IP dependency of the script.

      Check if your distribution has a package for it:

      yum install perl-Data-Validate-IP

      Otherwise you may want to package it yourself or install it from CPAN with:

      cpanm Data::Validate::IP

Leave a Reply

Your email address will not be published. Required fields are marked *