Threat feed / Small business and branch firewalls / Script or API
Block attackers on MikroTik RouterOS 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.rsc
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 | MikroTik RouterOS |
|---|---|
| What it accepts | ip, cidr, ipv6, range, domain |
| File format | No subscription feature; a script must fetch and load the list. Address-list entries: IPv4 address, prefix, range; IPv6 address or prefix (no ranges) in a separate /ipv6 list. Anything that is not a valid address is stored as a DNS name without error and resolved by the router. Best served as a ready .rsc file of 'add list=... address=... timeout=...' lines; a plain list needs parsing in script and is limited by variable size. |
| Limits | fetch output=user: variable limit 64Kb (20Kb data when user-with-headers). Longest address-list timeout 35w3d13h13m56s. No documented maximum number of address-list entries (memory bound). |
| Needs | No licence. Commands are from the current RouterOS v7 manual. For certificate checking set check-certificate=yes or yes-without-crl (default is no: 'In HTTPS mode by default, no certificate checks are made'); validation uses the local certificate store. |
Add the feed
- WinBox/WebFig equivalents: System > Scripts (add script), System > Scheduler (add schedule), IP > Firewall > Raw (add rule). Paste the CLI block in a terminal instead.
Commands
# ---------------------------------------------------------------
# NOT RUN ON A ROUTER. Every single command below is taken from the
# official RouterOS manual; the way they are combined is ours.
# ---------------------------------------------------------------
# VARIANT A (recommended): https://cybersecurity.acidripp.com/feed/block/strict.rsc serves a RouterOS .rsc file, e.g.
# /ip firewall address-list
# add list=acidripp-strict address=203.0.113.0/24 timeout=1d
# add list=acidripp-strict address=198.51.100.7 timeout=1d
# [file layout: official export format from the Address lists page;
# the timeout= on each line is our addition]
# 1. Update script [composed; fetch, remove [find list=...] and /import are each official]
/system script add name=threatfeed-update source={
/tool fetch url="https://cybersecurity.acidripp.com/feed/block/strict.rsc" dst-path=threatfeed.rsc check-certificate=yes-without-crl
:if ([:len [/file find name=threatfeed.rsc]] > 0) do={
/ip firewall address-list remove [find list=acidripp-strict]
/import threatfeed.rsc
}
}
# 2. Scheduler [official syntax: /system scheduler add name=... interval=... on-event=<script name>]
/system scheduler add name=threatfeed-update interval=10m on-event=threatfeed-update
# 3. Block inbound [official rule, verbatim pattern from the Address lists page]
/ip firewall raw add chain=prerouting action=drop in-interface-list=WAN src-address-list=acidripp-strict comment="Drop traffic from threat feed"
# 4. Block outbound to the same addresses [dst-address-list in raw prerouting is official
# (Building Advanced Firewall); in-interface-list=LAN is our addition]
/ip firewall raw add chain=prerouting action=drop in-interface-list=LAN dst-address-list=acidripp-strict comment="Drop traffic to threat feed"
# IPv6: separate list and rules under /ipv6 firewall address-list and /ipv6 firewall raw [official]
# /ipv6 firewall raw add chain=prerouting action=drop in-interface-list=WAN src-address-list=acidripp-strict
# ---------------------------------------------------------------
# VARIANT B: https://cybersecurity.acidripp.com/feed/block/strict.rsc serves a plain list (one IP or CIDR per line, LF line ends).
# ENTIRELY COMPOSED, UNTESTED. Works only while the whole file is under the
# documented 64Kb limit of fetch output=user (about 4000 IPv4 lines).
# Loop style follows the official "Parse file" scripting example (:find / :pick).
/system script add name=threatfeed-update-plain source={
:local r [/tool fetch url="https://cybersecurity.acidripp.com/feed/block/strict.rsc" check-certificate=yes-without-crl output=user as-value]
:local content ($r->"data")
:local len [:len $content]
:local lastEnd 0
:local lineEnd 0
:local line ""
:while ($lastEnd < $len) do={
:set lineEnd [:find $content "\n" ($lastEnd - 1)]
:if ([:typeof $lineEnd] = "nil") do={ :set lineEnd $len }
:set line [:pick $content $lastEnd $lineEnd]
:set lastEnd ($lineEnd + 1)
:if (([:len $line] > 0) && ([:pick $line 0 1] != "#")) do={
:do { /ip firewall address-list add list=acidripp-strict address=$line timeout=1d } on-error={}
}
}
}
# Variant B never removes entries: an address that leaves the feed expires when its
# timeout runs out; an address still in the feed fails the add (already exists) and is
# NOT refreshed, so it also expires and is re-added on the next run (short gap).
Block with it
- Inbound: /ip firewall raw add chain=prerouting action=drop in-interface-list=WAN src-address-list=acidripp-strict (official example).
- Outbound: raw prerouting drop with dst-address-list=acidripp-strict.
- IPv6: repeat under /ipv6 firewall address-list and /ipv6 firewall raw; lists with the same name are separate.
Good to know
- Not run on a router by us; test on a lab device first.
- Entries with a timeout are dynamic: not saved in the configuration and cleared by a reboot, so the list is empty until the next scheduler run.
- Variant A empties the list just before the import, leaving a short unprotected moment each run.
- A duplicate add stops a plain /import; keep the .rsc free of duplicates.
- Raw rules drop before connection tracking, so replies from a listed address to an already open connection are dropped too.
- A domain line in a plain list becomes a DNS-resolved entry rather than an error.
- Forum reports say device-mode can block /tool fetch from scripts on some devices; not checked in the manual.
What we could not confirm
- The combined scripts were not executed; Variant B (plain list parser) is wholly composed, including the :find start offset.
- Whether an .rsc line with timeout= imports exactly as written (timeout on add is documented, but not in an import example).
- Scheduler/script policy settings needed for fetch.
- Which root certificates the router trusts by default.
- Device-mode restrictions.
Sources
- https://manual.mikrotik.com/docs/firewall-and-quality-of-service/firewall/address-lists/
- https://help.mikrotik.com/docs/spaces/ROS/pages/8978514/Fetch
- https://help.mikrotik.com/docs/spaces/ROS/pages/40992881/Scheduler
- https://manual.mikrotik.com/docs/developer-guides/scripting/scripting-examples/
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.