I’m trying to build a script which resolves a dyndns address store it on a variable and add it to NEW allowed address (and removes the old one) from IP Service / Winbox / allowed address.
there is no direct way you have to put it in an array, this is not the answer you are looking for but it’s a step in right direction this command will add this two address from the list
Hi loloski,
thanks for your effort. After some tweak the script working but unfortunately still replace the line to only one (the variable).
Here is the script so far:
:global myip [:resolve domain-name=myip.selfip.net server=8.8.8.8]
:global address [/ip service find name="winbox" value-name]
:global list [:pick $address 1]
:set $list ($list,$myip)
/ip service set address=$list winbox
So this is working but still replace the whole address list. I’m trying now to manipulate further..
edit: problem will be somewhere in “winbox” value. Unfortunately somewhere the syntax will be the issue to read correctly the value of “Available From” table.