Openresty for ipxa
1.2K
IP Reputation and Network Intelligence Monitoring
IPXA is a high-performance, private-by-design platform for threat intelligence aggregation. It provides instant IP reputation queries, GeoIP data, and integration with 15+ Real-time Blackhole Lists (RBLs), all running entirely on your own infrastructure.
Instantly visualize the origin and risk score of any IP address with our premium web dashboard.
Multi-workspace environment for isolated security configurations.
IPXA provides native, high-performance middleware hooks for popular web servers, allowing you to block malicious traffic at the edge. These hooks support standardized JSON error responses with unique request_id tracking for enhanced observability.
Leverage the power of Lua in Nginx via OpenResty for ultra-low latency IP checking, complete with local caching.
Quick Setup:
lua-resty-http package (via luarocks).hooks/openresty/lua/ to your OpenResty lualib path (e.g., /usr/local/openresty/lualib/ipxa/).config.lua with your IPXA API URL and blocklist settings.nginx.conf:
http {
# ...
lua_package_path "/usr/local/openresty/lualib/ipxa/?.lua;;";
lua_shared_dict ip_cache 10m; # Required for caching
server {
# ...
error_page 403 /lua-error;
location / {
access_by_lua_file /usr/local/openresty/lualib/ipxa/ip_info_check.lua;
}
location = /lua-error {
internal;
content_by_lua_file /usr/local/openresty/lualib/ipxa/errors.lua;
}
}
}
(Check hooks/openresty/nginx.conf and hooks/openresty/Dockerfile for working examples).
When a request is blocked, the hooks return a machine-readable JSON response instead of default HTML error pages. This ensures consistent error handling for both browsers and API clients.
Example Blocked Response:
{
"error": "Forbidden",
"status": 403,
"request_id": "b10ed3a6f76ad62a75a956ce3e922336",
"message": "ipxa [block/risk-score]: 172.20.0.1 risk_score=14"
}
Content type
Image
Digest
sha256:f053e0676…
Size
168.8 MB
Last updated
13 days ago
docker pull liberatti/ipxa-resty