matteocorti / nagios_plugins

18 stars 7 forks source link

check_rbl not working correctly against fake RBL's #135

Closed matteocorti closed 8 years ago

matteocorti commented 8 years ago

Original reporter: nicza3@hotmail.com

Hi,

If, for example, run check_rbl against a fake (not working) RBL I get the following output instead of timing out or showing invalid RBL,

/usr/local/nagios/libexec/check_rbl -w 1 -c 2 -H '127.0.01' -s ddddd.com --timeout=10

CHECK_RBL OK - 127.0.01 BLACKLISTED on 0 servers of 1 | servers=0;1;2 time=0s;;

/usr/local/nagios/libexec/check_rbl -w 1 -c 2 -H '127.0.01' -s sdfhksdfhsdk.com --timeout=10

CHECK_RBL OK - 127.0.01 BLACKLISTED on 0 servers of 1 | servers=0;1;2 time=0s;;

Please advice.

matteocorti commented 8 years ago

Original reporter: matteo@corti.li

I will add validation to both the -H and -s options.

In any case ddddd.com is a valid hostname

host ddddd.com
ddddd.com has address 72.52.4.119
ddddd.com mail is handled by 0 mail.b-io.co.
matteocorti commented 8 years ago

Original reporter: anonymous

sdfhksdfhsdk.com doesnt.

Host sdfhksdfhsdk.com not found: 3(NXDOMAIN)

Either of them doesnt return DNSBL queries responses.

Tx for looking into this! very appreciated! great plugin.

matteocorti commented 8 years ago

Original reporter: matteo@corti.li

I released a new version with some parameter validation.

At the moment I am just checking if the arguments are valid and existing but not if they work. I don't know if a, maybe temporary, failure of a DNS server should be treated as an error ...