https://blocklister.gefoo.org
Blocklister is a simple API for generating MikroTik RouterOS compatible addresslists. The ipaddresses included in these lists are regularly updated using source sites such as iblocklist.com, dshield.org etc. Importing the resulting scripts into your routers is done by using a simple script which can later be scheduled to run every x days for example. There is no need to clean you addresslists manually as the resulting scripts includes a cleanup based on the comment of the addresslists, just be careful that you don't change the comments on the go. Name and comment of the resulting addresslists scripts can be customized using query parameters.
This solution has been heavily inspired by http://joshaven.com/resources/tricks/mi ... ress-list/.
Please note that each source ip address is limited to 10 requests per day!
Usage Example
Following a simplified example output. Each response's content-type is in plain/text. In this example I customize the addresslist name to "foo" and the comment to "bar".
Code: Select all
$ curl https://blocklister.gefoo.org/ads?listname=foo&comment=bar
Code: Select all
:foreach i in=[/ip firewall address-list find ] do={
:if ( [/ip firewall address-list get $i comment] = "bar") do={
/ip firewall address-list remove $i
}
}
# Now let's add the new ones
/ip firewall address-list
add address="1.1.1.1-1.1.1.255" list="foo" comment="bar"
add address="2.2.2.1-2.2.2.10" list="foo" comment="bar"
RouterOS Script Example
To automatically download and import the addresslists in your router you could use a script similar to this one. You will find the same script in the documentation link of the API https://blocklister.gefoo.org .
Code: Select all
/system script add name="Blocklister_download_Ads" source="/tool fetch url=\"https://blocklister.gefoo.org/ads?listname=foo&comment=bar\" dst-path=\"ads.rsc\"; /import file-name=\"ads.rsc\";"
API Links
- Basic documentation for the API and a list of available blocklists - https://blocklister.gefoo.org
- Ads - https://blocklister.gefoo.org/ads
- Spyware - https://blocklister.gefoo.org/spyware
- Level1 - https://blocklister.gefoo.org/level1
- Level2 - https://blocklister.gefoo.org/level2
- Level3 - https://blocklister.gefoo.org/level3
- Edu - https://blocklister.gefoo.org/edu
- Proxy - https://blocklister.gefoo.org/proxy
- Badpeers - https://blocklister.gefoo.org/badpeers
- Microsoft - https://blocklister.gefoo.org/microsoft
- Spider - https://blocklister.gefoo.org/spider
- Hijacked - https://blocklister.gefoo.org/hijacked
- Dshield - https://blocklister.gefoo.org/dshield
- Malwaredomainlist - https://blocklister.gefoo.org/malwaredomainlist
- Openbl - https://blocklister.gefoo.org/openbl
- Openbl_180 - https://blocklister.gefoo.org/openbl_180
- Openbl_360 - https://blocklister.gefoo.org/openbl_360
- Spamhausdrop - https://blocklister.gefoo.org/spamhausdrop
- Spamhausedrop - https://blocklister.gefoo.org/spamhausedrop
With these query parameters you can customized the name and comment which will be used to create the address-list on your router.
- listname - The name of the resulting addresslist
- comment - Use this query parameter to adjust the comment which will be used for this addresslist (Please make sure that this comment is unique among your addresslists)
WARNING
Please use this with care as you could possibly delete all of your addresslists entries.
Be careful with lists such as Level1, Badpeers they are extremely big and could crash your router.
Suggestions
Any suggestions are welcome. If you have some other ip lists that you would like to have added please let me know.