Community discussions

MikroTik App

Search found 11 matches

by Shumkov
Sat May 30, 2020 7:25 pm
Forum: Scripting
Topic: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)
Replies: 69
Views: 14818

Re: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)

You should be aware that when loading lists IF a duplicate IP is present the list will not load and processing stops.
Script ignores duplicates via on-error={}, processing is not interrupted.
by Shumkov
Fri May 29, 2020 9:52 pm
Forum: Scripting
Topic: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)
Replies: 69
Views: 14818

Re: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)

What is the recommended way to find out *why* an update failed? Address list <Spamhaus DROP> update failed Is great to see in the logs, but where do I look to try and figure out why it failed? This error occurs if the file is for some reason not available for download. The address list does not loa...
by Shumkov
Thu Mar 12, 2020 2:05 pm
Forum: Scripting
Topic: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)
Replies: 69
Views: 14818

Re: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)

Bugfix:
- correct regexp is "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}"

The bug is not critical, it’s just that in some cases the script could process strings containing not only IP addresses, but simply numerical combinations similar in format.
by Shumkov
Thu Mar 05, 2020 10:36 am
Forum: Scripting
Topic: how to detect or allow duplicate ips in firewall address lists
Replies: 3
Views: 2220

Re: how to detect or allow duplicate ips in firewall address lists

RouterOS does not allow duplicates in the same address list. But when loading a list of addresses containing duplicates, you can use an error handler: ip firewall address-list :do {add list=<list> address=<address>} on-error={} :do {add list=<list> address=<address>} on-error={} :do {add list=<list>...
by Shumkov
Tue Mar 03, 2020 8:15 pm
Forum: Scripting
Topic: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)
Replies: 69
Views: 14818

Re: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)

With the above script can I properly (full lists) download the below lists?
Download full lists - you can’t. 63KiB is a limitation of RouterOS, here scripts are powerless.
by Shumkov
Tue Mar 03, 2020 5:06 pm
Forum: Scripting
Topic: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)
Replies: 69
Views: 14818

Re: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)

Variant 2 : ip firewall address-list :local update do={ :do { :local data ([:tool fetch url=$url output=user as-value]->"data") :local array [find dynamic list=blacklist] :foreach value in=$array do={:set array (array,[get $value address])} :while ([:len $data]!=0) do={ :if ([:pick $data 0 [:find $...
by Shumkov
Fri Nov 08, 2019 9:30 am
Forum: Scripting
Topic: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)
Replies: 69
Views: 14818

Re: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)

Do you have a dedicated link the fullbogons piece? I cannot seem to fined a direct url for it? Fullbogons_IPv4: http://www.team-cymru.org/Services/Bogons/fullbogons-ipv4.txt All bogon lists: https://www.team-cymru.com/bogon-reference-http.html Bogons via BGP: https://www.team-cymru.com/bogon-refere...
by Shumkov
Thu Nov 07, 2019 12:41 pm
Forum: Scripting
Topic: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)
Replies: 69
Views: 14818

Re: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)

Is there a way to check the file size and have it trigger the email tool if it gets beyond the max file size?
You can try this:
if (([tool fetch url=<url> output=user as-value]->"total")>63) do={tool e-mail send ...}
by Shumkov
Mon Nov 04, 2019 9:51 am
Forum: Scripting
Topic: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)
Replies: 69
Views: 14818

Re: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)

It would be nice if this would be possible using a filter to have only the needed data in the variable. So there would be a lot more space in the variable This does not work :) " data " is an element of the array, and is accepted for processing only in its entirety - you cannot process only part of...
by Shumkov
Sun Nov 03, 2019 8:39 pm
Forum: Scripting
Topic: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)
Replies: 69
Views: 14818

Re: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)

Do not forget about file size - maximum 63 KiB . If the file size is larger than the maximum, only part of the file will be processed ( the first 63 KiB ), and the rest of the file will be discarded. FireHOL Level2 is bigger than 63 KiB :) What is general recommendation on how often to grab new list...
by Shumkov
Tue Oct 01, 2019 11:00 pm
Forum: Scripting
Topic: Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)
Replies: 69
Views: 14818

Address lists downloader (DShield, Spamhaus DROP/EDROP, etc)

Hello! The new parameter " output=user " provided new scripting capabilities that I decided to take full advantage of. - the script does not need third-party servers, since address lists are downloaded directly from the source and processed directly on the router . - the script does NOT save the dow...