@@ -116,7 +116,6 @@ For smaller MikroTik devices that cannot handle large blocklists at once, you ca
116116:local user " <username>"
117117:local pass " <password>"
118118
119- # (Optional) clear these lists up-front (matches your .rsc lines)
120119:local list4 " crowdsec-integration"
121120:local list6 " crowdsec-integration"
122121
@@ -125,8 +124,6 @@ For smaller MikroTik devices that cannot handle large blocklists at once, you ca
125124# ===============================
126125
127126:log info " $name start (v6, pagination, per-page import)"
128-
129- # Optional: start fresh
130127:log info " $name clearing address-lists"
131128/ip firewall address-list remove [ find where list= $list4 ]
132129/ipv6 firewall address-list remove [ find where list= $list6 ]
@@ -142,9 +139,7 @@ For smaller MikroTik devices that cannot handle large blocklists at once, you ca
142139 url=($baseUrl . " ?page=" . $page . " &page_size=" . $pageSize ) \
143140 mode=https dst-path=$tmpname keep-result=yes \
144141 http-auth-scheme=basic user=$user password=$pass \
145- idle-timeout=$fetchTimeout
146- # NOTE: You can optionally try gzip on newer v6 builds:
147- # http-header-field="Accept-Encoding:gzip"
142+ idle-timeout=$fetchTimeout http-header-field=" Accept-Encoding:gzip"
148143
149144 :if ([:len [/file find where name= $tmpname ]] = 0) do= {
150145 :log error " $name fetch failed for page $page "
@@ -192,6 +187,10 @@ For smaller MikroTik devices that cannot handle large blocklists at once, you ca
192187You need to replace ` < integration_id> ` , ` < username> ` and ` < password> ` with the values provided in the console.
193188:::
194189
190+ :::info
191+ adjust ` pageSize` to be as close as your MikroTik can handle to lower the amount of pages it has to go through
192+ :::
193+
195194:::warning
196195Do not change ` list= " crowdsec-integration" ` in the script, as it is used by the data you fetch from the CrowdSec API.
197196:::
0 commit comments