Anura IPDB
Anura's IPDB is a CIDR block suspect map using MMDB format and can be queried with any standard MMDB reader. Simply query an IPv4 or IPv6 address — if the IP is identified as suspect it will return {"s": 1}, if the IP is not identified as suspect there will be no records found for the IP.
Anura's IPDB builds on the intelligence from Anura Script and Anura Direct, and as the data updates frequently it is recommended to download the latest version at the top of every hour.
The Anura IPDB is available for enabled accounts. Contact your account representative to gain access.
How It Works
- Download the MMDB file from the Anura API (or via the Dashboard).
- Query an IP address using any MMDB-compatible reader.
- Evaluate the result — a record found means the IP is suspect; no record means the IP is non-suspect.
Result Values
| Result | Description |
|---|---|
| Record found | The IP is suspect. The record {"s": 1} is returned. |
| No record | The IP is non-suspect. No record is returned (null / empty / not found). |
Download Endpoint
The Anura IPDB and accompanying files are accessible through the API or through the Dashboard for enabled accounts.
| Method | URL | Note |
|---|---|---|
| POST | https://api.anura.io/v1/resources/ipdb/download | HTTPS required |
Parameters
| Required | Type | Description | Note |
|---|---|---|---|
| token | string | Your API token. | Generated in the Anura Dashboard |
| file | string | The filename to download. | See Available Files for the full list. |
Only API tokens generated by Admin users are valid.
Response
The endpoint returns a JSON object containing a presigned download URL. This URL is valid for 30 seconds and must be used immediately to download the file.
{"url": "https://s3.amazonaws.com/...presigned-url..."}
Presigned URLs expire after 30 seconds. Your download script should request and use the URL in a single operation.
Example Request
curl -s -X POST "https://api.anura.io/v1/resources/ipdb/download" \-H "Content-Type: application/x-www-form-urlencoded" \--data-urlencode "file=anura-ipdb.mmdb" \--data-urlencode "token=YOUR_TOKEN_HERE"
<?php$ch = curl_init("https://api.anura.io/v1/resources/ipdb/download");curl_setopt($ch, CURLOPT_POST, true);curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(['file' => 'anura-ipdb.mmdb','token' => 'YOUR_TOKEN_HERE',]));curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);$response = json_decode(curl_exec($ch));curl_close($ch);// Download using the presigned URLfile_put_contents('anura-ipdb.mmdb',file_get_contents($response->url));?>
Download Script
The following shell script automates requesting a presigned URL and downloading the file.
#!/bin/bash# download-ipdb.sh — Download a file from Anura IPDB# —— Configuration —————————————————————————————————API_URL="https://api.anura.io/v1/resources/ipdb/download"TOKEN="YOUR_TOKEN_HERE"FILE="${1:-anura-ipdb.mmdb}"OUTPUT_DIR="."urldecode() { local url="$1"; url="${url//+/ }"; printf '%b' "${url//%/\\x}"; }# —— Step 1: Request a presigned URL ———————————————————echo "Requesting presigned URL for '$FILE'..."RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "$API_URL" \-H "Content-Type: application/x-www-form-urlencoded" \--data-urlencode "file=$FILE" \--data-urlencode "token=$TOKEN")HTTP_CODE=$(echo "$RESPONSE" | tail -n1)BODY=$(echo "$RESPONSE" | head -n-1)if [ "$HTTP_CODE" -ne 200 ]; thenecho "Error: API returned HTTP $HTTP_CODE"echo "$BODY"exit 1fiRAW_URL=$(echo "$BODY" | grep -o '"url":"[^"]*"' | cut -d'"' -f4)PRESIGNED_URL=$(urldecode "$RAW_URL")if [ -z "$PRESIGNED_URL" ]; thenecho "Error: Could not parse presigned URL."echo "Response: $BODY"exit 1fiecho "Download URL received. Downloading $FILE..."# —— Step 2: Download the file —————————————————————OUTPUT_PATH="$OUTPUT_DIR/$FILE"HTTP_DOWNLOAD_CODE=$(curl -s -o "$OUTPUT_PATH" -w "%{http_code}" \"$PRESIGNED_URL")if [ "$HTTP_DOWNLOAD_CODE" -ne 200 ]; thenecho "Error: Download failed with HTTP $HTTP_DOWNLOAD_CODE"rm -f "$OUTPUT_PATH"exit 1fiif [ ! -s "$OUTPUT_PATH" ]; thenecho "Error: Downloaded file is empty."exit 1fiecho "Download complete: $OUTPUT_PATH ($(du -h "$OUTPUT_PATH" | cut -f1))"
Querying the IPDB
The Anura IPDB is a standard MMDB file and can be read with any MMDB-compatible library. The lookup logic is simple: if a record is found for the IP, it is suspect. If no record is found, it is non-suspect. No field parsing is needed — the mere presence of a record indicates a suspect IP.
Anura provides example lookup implementations in several languages, available for download through the API.
C Lookup
// Compile:gcc -O2 -o anura_lookup anura_lookup.c//// Usage:./anura_lookup 8.8.8.8./anura_lookup 10.0.0.1 /path/to/anura-ipdb.mmdb//// Output: "suspect" or "non-suspect"// Uses mmap for fast file access. ~3-5ms per lookup.
Go Lookup
// Build:go mod init anura_lookupgo build -o anura_lookup anura_lookup.go//// Usage:./anura_lookup 8.8.8.8./anura_lookup 10.0.0.1 /path/to/anura-ipdb.mmdb//// Output: "suspect" or "non-suspect"// Single static binary. ~2-3ms per lookup.
PHP Lookup
<?php// As a library:require_once 'anura_lookup.php';$result = anura_lookup('8.8.8.8');// Returns: "suspect" or "non-suspect"// With custom path:$result = anura_lookup('8.8.8.8', '/path/to/anura-ipdb.mmdb');// CLI: php anura_lookup.php 8.8.8.8// Pure PHP, no extensions required. ~1-3ms per lookup.?>
You are not limited to the provided examples. Any MMDB reader will work, including official libraries for Python, Java, .NET, Go, or C (libmaxminddb). Simply check whether a record exists for the IP — if it does, the IP is suspect.
Available Files
The following files are available for download through the API endpoint. Pass the filename as the file parameter.
| File | Description |
|---|---|
| anura-ipdb.mmdb | The IPDB file in MMDB format. |
| anura-ipdb.mmdb.gz | Gzip-compressed IPDB file, for reduced bandwidth. |
| SHA256CHECKSUMS | SHA256 checksums for verifying file integrity. |
| anura_lookup.c | Example lookup implementation in C. |
| anura_lookup.go | Example lookup implementation in Go. |
| anura_lookup.php | Example lookup implementation in PHP. |
| C_LOOKUP_README.md | Documentation for the C lookup example. |
| GO_LOOKUP_README.md | Documentation for the Go lookup example. |
| PHP_LOOKUP_README.md | Documentation for the PHP lookup example. |
Integrity Verification
After downloading, you can verify file integrity using the SHA256CHECKSUMS file:
# Download the checksum file./download-ipdb.sh SHA256CHECKSUMS# Verify the MMDB filesha256sum -c SHA256CHECKSUMS
Automation
Because the IPDB data updates frequently, it is recommended to automate downloads with a cron job running at the top of every hour:
# Download the latest IPDB every hour0 * * * * /path/to/download-ipdb.sh anura-ipdb.mmdb >> /var/log/ipdb-download.log 2>&1
If bandwidth is a concern, download the gzip-compressed version (anura-ipdb.mmdb.gz) and decompress it locally with gunzip -k anura-ipdb.mmdb.gz.