A DNS-based Realtime Blacklist (DNSRBL) checker with a Prometheus metrics endpoint. Written in Go.
This tool allows you to monitor your IP addresses against multiple DNS blacklists and expose the results as Prometheus metrics for alerting and monitoring.
- 📊 Prometheus metrics endpoint
- 🔍 Support for multiple DNSRBL servers
- 🐳 Multi-architecture Docker images (amd64, arm64)
- ⚙️ Configurable via environment variables
- 🛠️ Includes
verify-listsutility to test DNSRBL server responsiveness
go build -o dnsrbl-exporter ./cmd/dnsrbl-exportergo build -o verify-lists ./cmd/verify-listsgo build -o dnsrbl-exporter ./cmd/dnsrbl-exporter
go build -o verify-lists ./cmd/verify-lists./dnsrbl-exporterCheck version:
./dnsrbl-exporter -versionThe verify-lists utility tests all DNSRBL servers listed in lists.txt to ensure they are responsive:
./verify-listsdocker pull ghcr.io/runningman84/dnsrbl-exporter:latest
# or
docker pull runningman84/dnsrbl-exporter:latestdocker run -d -p 8000:8000 ghcr.io/runningman84/dnsrbl-exporter:latestThe container can be configured using these environment variables:
| Variable | Description | Default |
|---|---|---|
DNSRBL_HTTP_BL_ACCESS_KEY |
API Key for https://www.projecthoneypot.org | None |
DNSRBL_DELAY_REQUESTS |
Sleep time between two subsequent requests (single list check) | 1 |
DNSRBL_DELAY_RUNS |
Sleep time between two subsequent runs (full list check) | 60 |
DNSRBL_LISTS |
Space separated list of RBLs (e.g., "dnsbl.httpbl.org zen.spamhaus.org") | None |
DNSRBL_LISTS_FILENAME |
Filename containing list of RBLs, one per line | lists.txt |
DNSRBL_CHECK_IP |
IP address to be checked (auto-discovery if not set) | None |
DNSRBL_PORT |
Listener port for metrics server | 8000 |
Prometheus metrics are exposed at http://localhost:8000/metrics
For Flux CD users, see the flux/helm-release.yaml file for a complete example configuration using the app-template chart with ServiceMonitor integration.
Run the test suite:
go test ./...Run tests with coverage:
go test -cover ./...See LICENSE file for details.