This script updates the DNS records of DNS Stock.
It generates an URL http://dyndns.dns-stock.com/?hostname=<domain>&username=<username>&password=<pass>&myip=<ipaddr>
, which is eventually passed to the DNS Stock server. The code is basically about parsing, validating, checking and formatting the returned WAN IP <ipaddr>
. Two URLs are configured to check WAN IP. If the first one returns an error, the second one is queried. If that one fails as well, the script abandons. The logfile dnsstock_update.log
reveals relevant details about what happened.
Configured passwords can either be plain text (depreciated) or MD5 crypted (preferred), as visible on DNS Stock site. The DNS Stock server accepts both formats.
Code and logfile entries should be self-explanatory.
Download: dnsstock_update.sh
Comments are desired.
Thanks,