A DDNS script to send updates to NameSilo for OpenWrt/LEDE.
中文版本请参阅 README_CN.md。
My English is rough. If you are misguided by my word, I'm sorry, and I will help explain it~~
NameSilo is not a DDNS provider.
If your public IP address changes too frequent (like about 5 to 15 minutes or less, details see notes), I don't recommend you to use this script, unless you are so familiar with the theories of DNS and solutions related, and know what to do.
- A dynamic public IP address
- NameSilo API token, can generate one at https://www.namesilo.com/account_api.php
- GNU Wget with SSL support, can install it using
opkg install wget
command - (If using HTTPS) System CA certificates, can install it using
opkg install ca-certificates
command
First, use listDomains
to get the active domain list in NameSilo. Then the script will compare the fully qualified domain name (FQDN) you filled in with the domain list. If success, then split the FQDN into host name and domain.
Next, submit domain name to dnsListRecords
to get the DNS record list which related to the domain needed to update. Then it will compare the FQDN with the list. If success, then get record ID related.
Finally, update by submitting the record ID and the IP address aquired by DDNS client to dnsUpdateRecord
.
- Can not use DDNS client to stop DDNS process while doing extra timeout (sleep). But it can be stopped by first stop
sleep
process.
- LICENSE The full document of GNU General Public License(GPL)v2.0
- README_CN.md Readme (Simplified Chinese)
- README.md Readme(default language, aka English)
- update_namesilo_cn.sh Script in Simplified Chinese
- update_namesilo.sh Script in default language
Activated inside /etc/config/ddns
by setting
option update_script "/path/to/update_namesilo.sh" # Absolute path to the script
option password "API_token" # Your unique NameSilo API
option domain "www.example.com" # The FQDN that needs to update real time
# Wildcard DNS record via the "*" character are supported
# Multiple hostnames not supported for now
option param_opt "7207" # Record's time-to-live (TTL,default is 7207 if not provided)
About how to add Wildcard DNS records see NameSilo support page for DNS Manager.
Other options see Dynamic DNS Client configuration.
Complete configurations see DDNS Client.
You can also configure it using UCI or using OpenWrt/LEDE Web Interface.
- Merge all the other DDNS client configurations (like force update) into the script to let the DDNS client have a better control.
- Multiple hostnames support.
- NameSilo API references
- ACME Shell script, and dns_namesilo.sh file
- https://github.com/openwrt/packages/tree/master/net/ddns-scripts
After you modify one record in NameSilo's DNS manager, it shows up:
We publish DNS changes every 15 minutes. However, your change(s) may take a good deal longer to appear like they are working. This seeming delay is typically due to browser and/or DNS cache. Unfortunately, these issues are completely out of our control. You can read more about these issues on our DNS Troubleshooting page.
Rest assured that there are absolutely no delays on our end. Your DNS change(s) will be published in no longer than 15 minutes, but cache issues could take up to 48 hours to resolve permanently.
However, in NameSilo's DNS Troubleshooting page, it saids:
... Next, please remember that we only push DNS changes every 5 minutes. If your DNS change does not appear to be working after 5 minutes, and you have not recently updated the applicable domain(s) to use our name servers, it is very likely the result of browser and/or DNS caching. ...
acme.sh written by @Neilpang (specially dns_namesilo.sh written by @meowthink) can apply an SSL certificate from Let’s Encrypt in OpenWrt/LEDE by making good use of NameSilo API. Because of that (and also because I am a newbie in bash that I can't translate my thoughts into scripts), my script is referencing by their scripts, to interact with NameSilo.
At the same time, the script is also referencing by codes and samples from dynamic DNS client script in github. They make my script parsable with dynamic DNS client.
Thank you all.
You are welcomed to give suggestions (or help debug and modify it). Thanks.
Distributed under the terms of the GNU General Public License (GPL) version 2.0.