Threat feed / Open-source, Linux, BSD and host firewalls / Script or API
Block attackers on iptables with ipset with the ACIDRIPP feed
A small scheduled script or an API call keeps the list up to date. The feature is called ipset hash:net set matched with iptables -m set --match-set.
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 | iptables with ipset |
|---|---|
| What it accepts | ip, cidr, ipv6 |
| File format | Plain list, one IPv4 address or CIDR per line (IPv6 in a second set of family inet6). We can also serve a ready ipset restore file (create / add / swap lines). hash:net cannot store a /0 network. |
| Limits | maxelem default 65536 per hash set (ipset(8)); raise it with maxelem at create time. No other limit documented. |
| Needs | ipset and iptables packages; kernel ipset support (standard since Linux 2.6.39 per iptables-extensions(8)). |
Add the feed
#!/bin/sh
# /usr/local/sbin/feedblock-update.sh (composed by us; every ipset/iptables command used is in ipset(8)/iptables(8))
set -eu
URL="https://cybersecurity.acidripp.com/feed/block/strict.plain"; SET=feedblock; MAX=1000000
T=$(mktemp); trap 'rm -f "$T" "$T.r"' EXIT
curl -fsS --max-time 60 -o "$T" "$URL"
grep -E '^[0-9]{1,3}(\.[0-9]{1,3}){3}(/[0-9]{1,2})?$' "$T" | sort -u > "$T.r.in" || true
[ -s "$T.r.in" ] || { echo "feed empty or unreachable, keeping current set" >&2; rm -f "$T.r.in"; exit 1; }
{
echo "create $SET hash:net family inet maxelem $MAX"
echo "create ${SET}_new hash:net family inet maxelem $MAX"
echo "flush ${SET}_new"
sed "s/^/add ${SET}_new /" "$T.r.in"
echo "swap ${SET}_new $SET"
echo "destroy ${SET}_new"
} > "$T.r"; rm -f "$T.r.in"
ipset -exist restore -file "$T.r"
# block rule, added once
iptables -C INPUT -m set --match-set $SET src -j DROP 2>/dev/null || iptables -I INPUT 1 -m set --match-set $SET src -j DROP
iptables -C FORWARD -m set --match-set $SET src -j DROP 2>/dev/null || iptables -I FORWARD 1 -m set --match-set $SET src -j DROP
# cron (/etc/cron.d/feedblock):
# */5 * * * * root /usr/local/sbin/feedblock-update.sh
# IPv6: same script with SET=feedblock6, "family inet6", an IPv6 grep pattern and ip6tables.
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. Add your own DROP rule that matches the set.
Block with it
- The script inserts: iptables -I INPUT 1 -m set --match-set feedblock src -j DROP (and the same in FORWARD).
- To drop before connection tracking use the raw table instead: iptables -t raw -I PREROUTING -m set --match-set feedblock src -j DROP.
- For outbound blocking match the destination: iptables -I OUTPUT -m set --match-set feedblock dst -j DROP.
Good to know
- From the man pages: create, add, flush, swap, destroy, restore, -exist, -file, maxelem, hash:net, --match-set, iptables -C and -I. The script around them is ours.
- swap exchanges two existing sets of compatible type, so the live set is never empty during an update.
- restore does not erase existing sets unless the restore file says so, which is why the file flushes the _new set first.
- Sets live in kernel memory only: after a reboot run the script before (or as part of) loading saved iptables rules, otherwise a rule that names a missing set fails to load.
- If you change maxelem later, the create line with -exist fails because the parameters differ; destroy the set first.
What we could not confirm
- The script was assembled from documented commands but was not executed on a Linux host in this research.
Sources
- https://ipset.netfilter.org/ipset.man.html
- https://ipset.netfilter.org/iptables-extensions.man.html
- https://ipset.netfilter.org/iptables.man.html
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.