Report relay
Do you run servers in several countries? A report relay sends all your reports from a single country, for example your main one. That country is the one shown next to your reports on your public AbuseIPDB profile.
AbuseIPDB shows each report with the country of the address that sent it — not the country of the server that was attacked. Without a relay, a controller in Germany reporting for servers in France shows a German flag on every report.
The relay is a single PHP page, free and open source: shieldlist-report-relay.
What it does
- It receives the controller's reports and sends them to AbuseIPDB from the address of the hosting it is installed on.
- Same account, same reports, same daily allowance: the relay adds nothing and keeps nothing.
- It relays three requests only — a report, a file of reports, the withdrawal of an address's reports — and only to AbuseIPDB. Nothing in a request can send it anywhere else.
- Your AbuseIPDB key lives on the relay. The controller sends none.
- AbuseIPDB's answers come back as they are, the quota included: the console keeps showing what is left today.
- Anyone else who opens its address sees a short page saying what it is.
Install it
You need a web hosting in the country you want shown, with PHP 8.4 or later (with curl, standard everywhere) and HTTPS.
- Create a site or a subdomain with HTTPS, for example
https://relay.example.com. - Download the files from the repository and put them at the root of that site:
index.php,relay.php,.htaccess,.user.ini,config.example.php. - Copy
config.example.phptoconfig.phpand fill it in:key: your AbuseIPDB API key;secret: a random string of 32 characters or more, for example the output ofopenssl rand -hex 32;allow: the addresses of your controller, IPv4 and IPv6 (192.0.2.10,2001:db8::10, or ranges such as2001:db8::/64), and any machine that must test the relay, such as a monitoring server.
- Open
https://relay.example.comin a browser: you see the relay's short page.
On Apache (most shared hostings), the bundled .htaccess does the rest. On nginx alone, the repository's README gives the few lines to add.
Connect the controller
In the Web UI, Settings → Reporting → AbuseIPDB:
- Relay: the relay's address,
https://relay.example.com; - Relay secret: the same secret as in
config.php. It is stored on the controller and never shown again.
Choose the bulk mode: reports then wait for the relay if it is unreachable (see below).
The same in the configuration files:
abuseipdb:
mode: bulk
relay: https://relay.example.com
# secrets.yaml
abuseipdb:
relay_secret: the-same-secret-as-the-relay
The relay carries the reports of the servers the controller reports for: on each server, Who reports its sanctions to AbuseIPDB → the controller (reporting: controller). A server that reports with its own key keeps its own country.
To report directly again, empty the Relay field and give the controller its own AbuseIPDB key.
When the relay does not answer
- A red warning appears at the top of every page of the console, naming the relay, until it answers again.
- In bulk mode nothing is lost: the reports wait and leave in the next file once the relay answers (AbuseIPDB accepts reports up to two months old).
- In single mode, a report that could not leave is not sent again. Use bulk with a relay.
Security
- A request is relayed only if it comes from an address listed in
allowand carries the secret. Anything else is refused, and nothing leaves. - The relay can only reach AbuseIPDB: its three destinations are written in its code.
config.php, which holds the key, is never served by the web server.- The relay logs nothing but its own failures — never a key, a secret or a report.
- What it forwards is what AbuseIPDB publishes anyway: the reported addresses, the categories and the comments.
Troubleshooting
- The console says the relay answers 403, and the answer is not the relay's: the web server refused the request before PHP. Check that
mod_rewriteis on and that the site allows.htaccess. - A web application firewall (ModSecurity or a hosting provider's filter) may block what the controller sends: a file upload, a
DELETE, a client that is not a browser. Its log names the rule; exempt the relay's site from it — the relay already refuses every sender but yours. - 403 from the relay itself: the controller's address is not in
allow, or the secrets differ. - 413: the request is larger than PHP accepts on this hosting. Raise
upload_max_filesizeandpost_max_sizeto 10 MB in its control panel if.user.iniis not read.
The full reference is in the relay's README and in Controller → Configuration.