It resolves a DDNS address and puts the result in a firewall filter.
I use it to grant access to my company’s MikroTik from my home network with a dynamic WAN IP.
Maybe you have any ideas to improve it?
The FW:
/ip firewall filter add chain=input action=accept src-address=1.2.3.4 comment=myFireWall
The script:
{
:local myIP [resolve xxxxxxxxxxxxxx.sn.mynetname.net]
/ip firewall filter
:local myFW [find where comment=myFireWall]
set src-address=$myIP number=$myFW
}