how to import ip addresses list to mikrotik firewall

0
(0)

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.

Add rule to firewall for this list:

/ip firewall raw add chain=prerouting action=drop src-address-list=SpamHaus

Similar Posts:

3,911

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Scroll to Top