Simple Python script to monitor presence of IP(s) on defined RBL. Designed to be easily used with other monitoring/alerting tools such as Zabbix. Should work on any system with Python 2.x/3.x
Script will check if IP or set of IPs is present on predefined RBL set. Can work in following modes:
- Global (-g) display occurence count on all RBLs
- Detailed (-d) diplay status of IP on each RBL
Moreover, if any IP was listed on any RBL, exit code will be different than 0. Zero means clean pass, no IP(s) listed on RBLs
There are none. :-) It's written with portability in mind, so tried to use as much already availabe modules as possible. For a price of configuration files readability/formatting.
TODO
- python rblcheck.py -i 1.2.3.4 - checks if IP 1.2.3.4 is listed on any RBL, status can be read by exit code.
- python rblcheck.py -i 1.2.3.4 -g - displays on how many RBLs IP 1.2.3.4 was present
- python rblcheck.py -i 1.2.3.4 -d - displays status of IP 1.2.3.4 on each RBL
- clone this repository
- adjust config files
- run the script (with proper arguments, check examples)
Help is always welcome, so clone this repository, send pull requests or create issues if you find any bugs.
See LICENSE file.