Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 1.68 KB

addresslist-ip-update.md

File metadata and controls

44 lines (28 loc) · 1.68 KB

Update IP in IPv4 Address Lists

ℹ️ Info: This script can not be used on its own but requires the base installation of RouterOS scripts from eworm-de.

Description

This script updates IP in firewall address lists. It checks if there is internet to try to resolve the fqdn informed in the comments. If you want it will notify about any updated entry.

Requirements and installation

Just install the script:

$ScriptInstallUpdate addresslist-ip-update "base-url=https://raw.githubusercontent.com/martindb/routeros/main/";

Then add a scheduler to run it periodically:

/system/scheduler/add interval=5m name=addresslist-ip-update on-event="/system/script/run addresslist-ip-update;" start-time=startup;

Configuration

The address lists entries to be checked/updated have to be added to a list with specific comment:

/ip/firewall/address-list add comment="fqdn=google.com" address=0.0.0.0 list=testlist

If you want to receive a notification every time it's updated, add notify label to the comment:

/ip/firewall/address-list add comment="notify, fqdn=google.com" address=0.0.0.0 list=testlist

Also notification settings are required for e-mail, matrix and/or telegram.


⬅️ Go back to main README
⬆️ Go back to top