Skip to content

OpenWrt/LEDE Dynamic DNS (DDNS) Client scripts extension for NameSilo.

License

Notifications You must be signed in to change notification settings

lin010151/ddns-scripts_namesilo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenWrt/LEDE Dynamic DNS (DDNS) Client scripts extension for NameSilo

A DDNS script to send updates to NameSilo for OpenWrt/LEDE.

中文版本请参阅 README_CN.md

Before Read...

My English is rough. If you are misguided by my word, I'm sorry, and I will help explain it~~

Before Use...

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.

Requirements

  • 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

General Process Flow

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.

Known Issuse

  • Can not use DDNS client to stop DDNS process while doing extra timeout (sleep). But it can be stopped by first stop sleep process.

Files

Instructions

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.

To-do List

  • 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.

References

Notes

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. ...

License & Others

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.

About

OpenWrt/LEDE Dynamic DNS (DDNS) Client scripts extension for NameSilo.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages