How to automatically synchronize IPs from malcode.com

Because of RouterOS’s 4096 bytes read/write limit, I think you will need to use a PC/server to download the file and change it before uploading to the router.

  1. On a schedule, download the file to your PC/server.

  2. Script a third party command line tool to search and replace each line to something like:
    /ip firewall address-list add address=212.76.131.105 list=BlockedList;You’ll also need to remove or comment the first two text lines at the top of the file so the script doesn’t fail.

  3. Then rename the file to something**.rsc**, and upload to the router using FTP.

  4. Have a scheduled script on router to clean out old entries and add new ones:
    /ip firewall address-list remove [find list=BlockedList]
    /import IP_Blacklist.rsc