First fetch the address list in “mikrotik” format. Open “New terminal” in winbox. For example script:
/tool fetch url="http://joshaven.com/spamhaus.rsc" mode=http; :log info "Downloaded spamhaus.rsc from Joshaven.com"; :delay 40; /ip firewall address-list remove [find where comment="SpamHaus"]; /import file-name=spamhaus.rsc; :log info "Removed old Spamhaus records and imported new list";
This script downloads a file with a black list of IP addresses (spam) from the site to the firewall address list. Next, you can set up a firewall rule that will deny connections to these IP addresses.