{"id":1105,"date":"2018-08-26T22:02:26","date_gmt":"2018-08-26T19:02:26","guid":{"rendered":"https:\/\/helia.ee\/koolitus\/?page_id=1105"},"modified":"2018-08-26T22:02:26","modified_gmt":"2018-08-26T19:02:26","slug":"mikrotik-geoip","status":"publish","type":"page","link":"https:\/\/helia.ee\/koolitus\/?page_id=1105","title":{"rendered":"Mikrotik &#8211; GeoIP"},"content":{"rendered":"<p>Found this post<br \/>\n<a class=\"postlink\" href=\"http:\/\/blog.erben.sk\/2014\/02\/06\/country-cidr-ip-ranges\/\">http:\/\/blog.erben.sk\/2014\/02\/06\/country-cidr-ip-ranges\/<\/a><\/p>\n<div class=\"codebox\">\n<div class=\"codebox__header\">Code:\u00a0<a href=\"https:\/\/forum.mikrotik.com\/viewtopic.php?t=80777#\">Select all<\/a><\/div>\n<pre><code class=\"prettyprint prettyprinted\"><span class=\"str\">\/tool fetch url=http:\/<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">www<\/span><span class=\"pun\">.<\/span><span class=\"pln\">iwik<\/span><span class=\"pun\">.<\/span><span class=\"pln\">org<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">ipcountry<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">mikrotik<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">CN\r\n<\/span><span class=\"pun\">\/<\/span><span class=\"kwd\">import<\/span><span class=\"pln\"> file<\/span><span class=\"pun\">-<\/span><span class=\"pln\">name<\/span><span class=\"pun\">=<\/span><span class=\"pln\">CN<\/span><\/code><\/pre>\n<\/div>\n<p>Example for CHINA<br \/>\nIt generates script, which creates address-list named CN<\/p>\n<p>Source of ip blocks is\u00a0<a class=\"postlink\" href=\"http:\/\/ipdeny.com\/ipblocks\/\">http:\/\/ipdeny.com\/ipblocks\/<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<header class=\"entry-header\">\n<h1 class=\"entry-title\">Country CIDR IP ranges<\/h1>\n<div class=\"entry-meta\"><span class=\"sep\">Posted on\u00a0<\/span><a title=\"17:54\" href=\"http:\/\/blog.erben.sk\/2014\/02\/06\/country-cidr-ip-ranges\/\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"2014-02-06T17:54:13+00:00\">February 6, 2014<\/time><\/a><\/div>\n<\/header>\n<div class=\"entry-content\">\n<p>In my\u00a0<a title=\"Generating country IP ranges lists\" href=\"http:\/\/blog.erben.sk\/?p=471\">previous post<\/a>\u00a0I 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.<\/p>\n<p>You can find them here\u00a0<a title=\"http:\/\/www.iwik.org\/ipcountry\/\" href=\"http:\/\/www.iwik.org\/ipcountry\/\" target=\"_blank\" rel=\"noopener\">http:\/\/www.iwik.org\/ipcountry\/<\/a>\u00a0This list is generated daily at 12:00 CET.<\/p>\n<p>This list can be used for example on mikrotik router to block\/allow access from specified countries.<\/p>\n<p>To import country range, for example Slovak ranges, as firewall address-list use commands<\/p>\n<pre>\/tool fetch url=http:\/\/www.iwik.org\/ipcountry\/mikrotik\/SK\r\n\/import file-name=SK\r\n\r\n<a href=\"http:\/\/blog.erben.sk\/wp-content\/uploads\/2014\/02\/mikrotik-country-fw.png\"><img decoding=\"async\" src=\"http:\/\/blog.erben.sk\/wp-content\/uploads\/2014\/02\/mikrotik-country-fw.png\" alt=\"mikrotik-country-fw\" \/><\/a><\/pre>\n<p id=\"IXWgNmB\">\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Found this post http:\/\/blog.erben.sk\/2014\/02\/06\/country-cidr-ip-ranges\/ Code:\u00a0Select 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\u00a0http:\/\/ipdeny.com\/ipblocks\/ &nbsp; &nbsp; Country CIDR IP ranges Posted on\u00a0February 6, 2014 In my\u00a0previous post\u00a0I have showed how to easily generate IP range assigned to some country. I have modified [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":612,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-1105","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages\/1105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1105"}],"version-history":[{"count":1,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages\/1105\/revisions"}],"predecessor-version":[{"id":1107,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages\/1105\/revisions\/1107"}],"up":[{"embeddable":true,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages\/612"}],"wp:attachment":[{"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}