Coder Social home page Coder Social logo

calmact / ddns-scripts_namesilo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lin010151/ddns-scripts_namesilo

0.0 0.0 0.0 30 KB

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

License: GNU General Public License v2.0

Shell 100.00%

ddns-scripts_namesilo's Introduction

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.

ddns-scripts_namesilo's People

Contributors

lin010151 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.