After playing around with the version 6.x script, I recommend that the following line be changed from
:global ipddns [:resolve $ddnshost];
to
:global ipddns
Reason: if you’re paying for DynDNS service, you only get a certain number of queries per month before they start charging you more. If you run your update script every minute, that’s approximately 43,000 queries per month, just to manage your external IP to hostname mapping - kind of wasteful if you ask me. Instead, simply declare the variable. The first time the script runs, it will send an update because the $ipddns variable won’t match the $ipfresh variable. It will then set them equal to each other. On subsequent iterations of the script, it will simply compare the current interface IP ($ipfresh) to the last IP update it sent to Dyn ($ddnsip). No need to waste 43k queries a month to get an IP address you already know!
Another update I’ve yet to make on my gateway is dynamic enumeration of the WAN interface. An earlier version of the script did this, but the 6.x version does not. It shouldn’t be too hard to adapt the portion of the older script to work on the newer version of ROS, and would make the script more plug and play for users.