Threat feed / Open-source, Linux, BSD and host firewalls / Script or API
Block attackers on UFW with the ACIDRIPP feed
A small scheduled script or an API call keeps the list up to date.
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 | UFW (Uncomplicated Firewall) |
|---|---|
| What it accepts | ip, cidr, ipv6 |
| File format | UFW has no list or set object. Either one ufw rule per address (ufw prepend deny from ADDRESS), or an ipset referenced from /etc/ufw/before.rules in iptables-restore syntax. |
| Limits | not documented (one rule per address becomes slow with thousands of entries; no number is given in the man pages) |
| Needs | ufw; the ipset package for the set approach. |
Add the feed
# 1) /etc/ufw/before.init (hook documented in ufw-framework(8); must be executable). Content composed by us:
#!/bin/sh
case "$1" in
start) ipset -exist create feedblock hash:net family inet maxelem 1000000 ;;
esac
# chmod +x /etc/ufw/before.init
# 2) /etc/ufw/before.rules - add this line inside the *filter section, before its COMMIT (iptables-restore syntax, as the man page says):
-A ufw-before-input -m set --match-set feedblock src -j DROP
# 3) ufw reload
# 4) keep the set fresh with the ipset swap script from the "iptables + ipset" entry (drop its two iptables lines), every 5 minutes:
# */5 * * * * root /usr/local/sbin/feedblock-update.sh
# Small lists only, pure ufw (documented syntax, one rule per address):
# ufw prepend deny from 1.2.3.4
Ready-made file
We also serve this list already in the right shape for this product:
https://cybersecurity.acidripp.com/feed/block/strict.ipset
An ipset restore script that builds the sets acidripp-strict-v4 and acidripp-strict-v6 and swaps them in one step: curl -fsS https://cybersecurity.acidripp.com/feed/block/strict.ipset | ipset restore.
Block with it
- The line in before.rules drops any packet whose source is in the set before ufw's own user rules are evaluated (man page: before.rules first, user.rules next, after.rules last).
- For IPv6 add the matching line to /etc/ufw/before6.rules with chain ufw6-before-input and an inet6 set.
Good to know
- From ufw-framework(8): before.rules uses iptables-restore syntax and may be customised; before.init is run by ufw-init before the firewall is initialised; you must reload ufw after editing. From ufw(8): prepend and deny from.
- The man pages do not mention ipset at all. Combining the two is our composition, widely used but not an official recipe.
- ufw status does not show rules placed in the rules files (stated in the man page).
- If the set does not exist when ufw loads, the rule fails to load; that is what the before.init line prevents.
What we could not confirm
- Chain names ufw-before-input and ufw6-before-input are the ones shipped in the default before.rules; they were not re-read in a doc.
- The man page writes the hook path once as /etc/ufw/before.init and once as /etc/before.init; we use /etc/ufw/before.init.
- Not executed on a host in this research.
Sources
- https://manpages.ubuntu.com/manpages/noble/en/man8/ufw-framework.8.html
- https://manpages.ubuntu.com/manpages/noble/en/man8/ufw.8.html
- https://ipset.netfilter.org/ipset.man.html
Most steps were checked against the vendor's documentation; the points above were not 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.