Block List Downloader
This is a very simple script it grabs the data from a remote source in this case our api it then generates a file called genlist.rsc. after downloading it will then add all the ip's listed into different block groups.
There are 2 options to use SPAMHAUS_DROP's or FIREHOL (FIREHOL uses SPAMHAUS data so there is an argument to say only using FIREHOL would be recommended)
- SPAMHAUS_DROP
- SPAMHAUS_EDROP
- FIREHOL_LEVEL4
A part of your API access you can enable rules you want to tailor make. click here to access your routers API access.
| list | file | total IP's |
|---|
:local SERIAL [/system/routerboard/get serial-number];
:local AUTHID "1";
:local AUTHKEY "AUTHKEY";
:local URL "https://portal-networks.co.uk/api/mikrotik/";
/tool fetch url="$URL?action=getFireholList&serial=$SERIAL&authkey=$AUTHKEY&authid=$AUTHID" mode=https dst-path=genlist.rsc;
:log info "Downloaded Fire Hol BlockList";
/import file-name=genlist.rsc;
:log info "Updated BlockList";
/file/remove genlist.rsc;
/tool fetch url="$URL?action=getSpamHausBlockList&serial=$SERIAL&authkey=$AUTHKEY&authid=$AUTHID" mode=https dst-path=genlist.rsc;
:log info "Downloaded SpamHaus Block List";
/import file-name=genlist.rsc;
:log info "Updated BlockList";
/file/remove genlist.rsc;