Skip to content

Instantly share code, notes, and snippets.

View miguelangel-nubla's full-sized avatar

Miguel Angel Nubla miguelangel-nubla

View GitHub Profile
@miguelangel-nubla
miguelangel-nubla / address-list-from-url.rsc
Last active December 20, 2024 15:21
Mikrotik script to generate address lists from URLs
# Function to update an address list from multiple URLs
:local updateAddressList do={
:do {
# Clear existing entries if not updated
/ip firewall address-list set [find list=$listName dynamic=no] timeout=$timeout dynamic=yes
/ipv6 firewall address-list set [find list=$listName dynamic=no] timeout=$timeout dynamic=yes
# Loop through each URL
:foreach url in=$urls do={
# Fetch data from the current URL