Select a blocklist data source appropriate to your use case: Spamhaus DROP/EDROP lists cover hijacked or criminal-controlled netblocks; Spamhaus SBL covers known spam sources; commercial feeds (Emerging Threats, Proofpoint ET Intelligence) cover broader threat categories; FireHOL aggregates multiple public feeds in IPSet format.
For edge enforcement at the firewall or CDN layer, fetch blocklist feeds in a machine-readable format (CIDR text files, JSON, or IPSet); automate the fetch on a schedule (hourly or daily depending on feed update frequency) and diff against the previous version to identify additions and removals.
At the WAF or CDN layer, use your provider's IP list feature to maintain a managed deny-list: Cloudflare supports IP Lists (up to 10,000 IPs per list) that can be referenced in WAF expressions; AWS WAF supports IP Sets that can be updated via UpdateIPSet API calls.
For application-layer enforcement, query a real-time DNSBL (DNS Blocklist) at request time: reverse the IP octets and query LISTED_IP.zen.spamhaus.org; a non-NXDOMAIN response indicates a listed address. Cache positive and negative results with appropriate TTLs to limit DNS query volume.
Implement a grace/flag action before hard-blocking: challenge or flag traffic from listed IPs and observe false-positive rates before blocking outright; well-known cloud NAT ranges (AWS, Google, Azure egress IPs) appear on some blocklists and blocking them may affect legitimate users.
For inbound email, apply blocklist checks in your MTA at the SMTP CONNECT stage before accepting the message; this is more efficient than post-DATA rejection. Log all blocklist hits with the feed name and list category for audit purposes.
Known gotchas
DNSBL queries for Spamhaus and similar feeds have usage terms; high-volume production use typically requires a paid data feed subscription rather than free public DNS queries, which are rate-limited and intended for low-volume testing only.
Blocklists contain false positives, particularly for shared hosting or large cloud egress IPs; always pair blocklist enforcement with a manually-managed allowlist for known-good IP ranges that override blocklist hits.
Blocklist data ages quickly; an IP removed from a feed after remediation may remain in your local cache or static deny-list for hours or days—build TTL-aware refresh logic and remove stale entries automatically.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp