Mikrotik – GeoIP

Found this post

Code: Select all
/tool fetch url=http://www.iwik.org/ipcountry/mikrotik/CN
/import file-name=CN

Example for CHINA
It generates script, which creates address-list named CN

Source of ip blocks is http://ipdeny.com/ipblocks/



Country CIDR IP ranges

In my previous post I have showed how to easily generate IP range assigned to some country. I have modified this previous script to generate IP blocks for all countries and put it online for free download and usage.

You can find them here http://www.iwik.org/ipcountry/ This list is generated daily at 12:00 CET.

This list can be used for example on mikrotik router to block/allow access from specified countries.

To import country range, for example Slovak ranges, as firewall address-list use commands

/tool fetch url=http://www.iwik.org/ipcountry/mikrotik/SK
/import file-name=SK