cybersecurity Request an audit

Threat feed / Web application firewalls and web servers / Script or API

Block attackers on nginx with the ACIDRIPP feed

A small scheduled script or an API call keeps the list up to date. The feature is called deny directive (ngx_http_access_module) in an included file, or geo block (ngx_http_geo_module) with an include file.

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

Productnginx
What it acceptsip, cidr, ipv6, ipv6-cidr
File formatDeny file: one directive per line, 'deny 192.168.1.1;' or 'deny 2001:0db8::/32;'. Geo file: 'address-or-CIDR value;' per line, for example '10.2.0.0/16 RU;' (use a value such as 1).
Limitsnot documented. nginx says: 'In case of a lot of rules, the use of the ngx_http_geo_module module variables is preferable.'
NeedsAny nginx with ngx_http_access_module (deny in http, server, location, limit_except) or ngx_http_geo_module (geo in http).

Add the feed

# A) deny file. Cron job: write one 'deny <address>;' line per feed entry, then reload.
curl -s https://cybersecurity.acidripp.com/feed/block/strict.plain | grep -v '^#' | sed 's/.*/deny &;/' > /etc/nginx/threat-feed-deny.conf
# in http, server or location:
include /etc/nginx/threat-feed-deny.conf;

# B) geo file (preferred for large lists). Cron job writes '<address> 1;' lines.
curl -s https://cybersecurity.acidripp.com/feed/block/strict.plain | grep -v '^#' | sed 's/.*/& 1;/' > /etc/nginx/threat-feed-geo.conf
# in http:
geo $threat_feed {
    default 0;
    include /etc/nginx/threat-feed-geo.conf;
}
# in server or location:
if ($threat_feed) { return 403; }

# Reload
nginx -s reload    # or: kill -HUP $(cat /usr/local/nginx/logs/nginx.pid)

Ready-made file

We also serve this list already in the right shape for this product:

https://cybersecurity.acidripp.com/feed/block/strict.nginx

deny lines, ready to save as a file and include in a server or location block.

Block with it

  1. Convert the feed to a deny file or a geo file with a scheduled job.
  2. Reference the file with include.
  3. Reload nginx after every refresh.

Good to know

  • nginx does not fetch a URL; the file is read only when the configuration is loaded.
  • On reload the master process checks the syntax first; if the new configuration fails it keeps the old one.
  • deny rules are checked in sequence until the first match.
  • deny directives are inherited from the outer level only if the current level has no allow or deny directives.
  • Both modules match the connecting address; behind a proxy or CDN, the real client address must be restored first.
  • We can serve the feed already in 'deny x;' or 'x 1;' form to remove the sed step.

What we could not confirm

  • The 'if ($threat_feed) { return 403; }' line uses the rewrite module, whose page was not read in this research.
  • 'nginx -s reload' is not on the control page read (it documents the HUP signal).
  • The realip module for proxied setups was not read.

Sources

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.