Threat feed / Open-source, Linux, BSD and host firewalls / Script or API
Block attackers on macOS pf with the ACIDRIPP feed
A small scheduled script or an API call keeps the list up to date. The feature is called pf table with persist file, updated with pfctl -t NAME -T replace -f 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
| Product | macOS pf (packet filter) |
|---|---|
| What it accepts | ip, cidr, ipv6, domain |
| File format | pf.conf(5): the file lists IP addresses one per line; lines beginning with # are comments; hostnames are also accepted and resolved when loaded. CIDR networks are accepted (tableaddr with /mask-bits). |
| Limits | pf limit table-entries (pf.conf(5) shows "set limit table-entries 100000" as the example syntax); the macOS default value is not stated in the man page. |
| Needs | Built into macOS (pfctl, /etc/pf.conf). Root access. |
Add the feed
# 1) add to the END of /etc/pf.conf (keep the com.apple lines above untouched):
table <feedblock> persist file "/etc/feedblock.txt"
anchor "feedblock"
load anchor "feedblock" from "/etc/pf.anchors/feedblock"
# 2) /etc/pf.anchors/feedblock:
block drop in quick from <feedblock> to any
block drop out quick from any to <feedblock>
# 3) first load (the list file must exist before pf.conf is loaded):
sudo curl -fsS -o /etc/feedblock.txt "https://cybersecurity.acidripp.com/feed/block/strict.plain"
sudo pfctl -n -f /etc/pf.conf # parse only, check for errors
sudo pfctl -f /etc/pf.conf
sudo pfctl -E # enable pf
# 4) /usr/local/sbin/feedblock-update.sh (composed by us; -T replace swaps the table contents in one command)
#!/bin/sh
set -eu
T=$(mktemp); trap 'rm -f "$T"' EXIT
curl -fsS --max-time 60 -o "$T" "https://cybersecurity.acidripp.com/feed/block/strict.plain"
[ -s "$T" ] || exit 1
cp "$T" /etc/feedblock.txt
pfctl -t feedblock -T replace -f /etc/feedblock.txt
# 5) run it every 15 minutes and at boot: /Library/LaunchDaemons/com.example.feedblock.plist with
# ProgramArguments = [/bin/sh, -c, "/sbin/pfctl -E -f /etc/pf.conf; /usr/local/sbin/feedblock-update.sh"], RunAtLoad = true, StartInterval = 900
# sudo launchctl bootstrap system /Library/LaunchDaemons/com.example.feedblock.plist
# check: sudo pfctl -t feedblock -T show | head
Block with it
- The anchor rules block packets from the table inbound and to the table outbound (quick stops further rule evaluation).
- pfctl -E enables pf and adds an enable reference, as /etc/pf.conf asks components to do.
Good to know
- The built-in Application Firewall (System Settings > Network > Firewall) filters per application and cannot block by IP address; pf is the only built-in way.
- pf is not enabled automatically at boot (stated in /etc/pf.conf), hence the launchd job.
- macOS upgrades can replace /etc/pf.conf; re-check after each upgrade.
- Do not flush the main ruleset: Apple's own anchors (com.apple/*) depend on it (stated in /etc/pf.conf).
- From the man pages: table persist file, -t / -T replace / -T show, -f, -n, -E, anchor and load anchor. The file layout, update script and launchd job are ours.
- Little Snitch: no official IP-feed import was checked in this research; treat as not supported for this purpose.
What we could not confirm
- Not loaded on a Mac in this research (no system changes were made).
- That rules inside an anchor resolve a table defined in the main ruleset is standard pf behaviour but is not spelled out in the macOS man page. If in doubt put the two block lines directly at the end of /etc/pf.conf instead of using the anchor.
- Apple publishes no online copy of these man pages, so there is no URL to cite.
- The launchd plist is described, not given in full.
Sources
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.