Threat feed / Web application firewalls and web servers / Script or API
Block attackers on HAProxy with the ACIDRIPP feed
A small scheduled script or an API call keeps the list up to date. The feature is called ACL pattern file (acl ... src -f <file>) with Runtime API updates (prepare acl / add acl / commit acl).
The address to use
https://cybersecurity.acidripp.com/feed/block/strict.plain
This is the strict list: addresses that got into our decoys, ran commands there or brought malware in the last 14 days. It is small and safe to block. For more coverage, replace strict in the address with standard (also addresses that tried passwords) or wide (also every scanner). What each list holds, and every format, is on the threat feed page.
Before you start
| Product | HAProxy |
|---|---|
| What it accepts | ip, cidr, ipv6, ipv6-cidr |
| File format | Plain text, one value per line. Empty lines and lines starting with # are ignored; leading spaces and tabs are stripped. IPv4 plain or with a netmask (192.168.0.1/22); IPv6 in the usual form, with or without a bit-count mask. Our plain list works unchanged. |
| Limits | not documented. IPv4 patterns are loaded into a binary tree for very fast lookups and duplicates are removed. |
| Needs | HAProxy (manual read: version 3.2). Runtime updates need the stats socket and a tool such as socat. |
Add the feed
# haproxy.cfg (file fetched by cron: curl -s -o /etc/haproxy/blacklist.lst https://cybersecurity.acidripp.com/feed/block/strict.plain)
frontend www
http-request deny if { src -f /etc/haproxy/blacklist.lst }
# or at connection level:
# tcp-request connection reject if { src -f /etc/haproxy/blacklist.lst }
# Atomic refresh without reload (Runtime API)
echo "prepare acl /etc/haproxy/blacklist.lst" | socat /var/run/haproxy.sock stdio # prints: New version created: N
echo "add acl @N /etc/haproxy/blacklist.lst 198.51.100.4" | socat /var/run/haproxy.sock stdio # repeat per entry
echo "commit acl @N /etc/haproxy/blacklist.lst" | socat /var/run/haproxy.sock stdio
Block with it
- Download the feed to a file.
- Reference it with 'src -f <file>' in an http-request deny or tcp-request connection reject rule.
- Refresh by reloading HAProxy, or by prepare acl, add acl @<ver>, commit acl @<ver> on the stats socket.
Good to know
- HAProxy does not fetch a URL; the file is read when the configuration is loaded.
- commit acl replaces the visible entries atomically and deletes past versions.
- Entries added with a version number do not match until commit acl.
- A file is always identified by its name on the socket; 'show acl' lists ids and names.
- The acl commands cannot be used on a name that is also used as a map (use the map commands).
- Other commands: clear acl, del acl <acl> <key>, add acl <acl> <pattern> (current version).
- Keep the file on disk updated too, so a later reload does not bring back old entries.
- src is the connecting address; behind a proxy or CDN match the forwarded address instead.
- The HAProxy manual's own examples use { src -f /etc/haproxy/blacklist.lst } with http-request return status 403 and tcp-request content rules.
What we could not confirm
- The stats socket configuration line (stats socket ... level admin) and the permission level needed for acl commands were not read.
- Whether 'add acl' accepts many entries in one payload was not confirmed (the payload form is documented for 'add map').
- The manual does not state that runtime changes are lost on reload; that is our assumption.
Sources
- https://docs.haproxy.org/3.2/configuration.html
- https://www.haproxy.org/download/3.2/doc/configuration.txt
- https://www.haproxy.org/download/3.2/doc/management.txt
The steps were checked against the vendor's documentation on 30 November 2026. They were not tested on a device: menus move between versions, so check against your own. Found a mistake? Write to audit@acidripp.com. The feed comes with no guarantee; test before you block production traffic.