Git Product home page Git Product logo

luobolong / godaddy-ddns Goto Github PK

View Code? Open in Web Editor NEW

This project forked from carledman/godaddy-ddns

0.0 0.0 0.0 25 KB

A script for dynamically updating a GoDaddy DNS record. I use GoDaddy to host DNS for a domain and I wanted to point an A record in that domain to a host who's IP address changes occasionally. GoDaddy has an API to do this, so this happened. Cf. thatjpk/cloudflare-ddns.

License: The Unlicense

Python 98.82% Dockerfile 1.18%

godaddy-ddns's Introduction

godaddy-ddns

Introduction

A script for dynamically updating a GoDaddy DNS record. I use GoDaddy to host DNS for a domain and I wanted to point an A record in that domain to a host who's IP address changes occasionally. GoDaddy has an API to do this, so this happened. This package, in particular this README.MD, is inspired by the equivalent for CloudFlare offered by thatjpk.

Docker

This program can be run as a Docker container, or on a device in your home network running Python 3.

Using Docker, you can invoke the program like this:

docker run godaddyddns --version

Dependencies

This program was written and tested using Python 3, so you'll need:

  • Python (opkg install python3-light):
  • Codecs (opkg install python3-codecs)
  • Email (opkg install python3-email)
  • OpenSSL (opkg install python3-openssl)
  • CA Certificates (opkg install ca-bundle)

The program may also work under Python 2.7 by changing python3 to python in the first line, but this configuration has not been tested.

Usage

Invoke the program like this:

 godaddy_ddns.py [-h] [--version] [--ip IP] [--key KEY] [--secret SECRET] [--ttl TTL] hostname

 positional arguments:

 hostname         DNS fully-qualified host name with an 'A' record.  If the hostname consists of only a domain name
                  (i.e., it contains only one period), the record for '@' is updated.

 optional arguments:

 -h, --help       show this help message and exit

 --version        show program's version number and exit

 --ip IP          DNS Address (defaults to public WAN address from http://ipv4.icanhazip.com/)

 --key KEY        GoDaddy production key

 --secret SECRET  GoDaddy production secret

 --ttl TTL        DNS TTL.

GoDaddy customers can obtain values for the KEY and SECRET arguments by creating a production key at https://developer.godaddy.com/keys/.

Note that command line arguments may be specified in a FILE, one to a line, by instead giving the argument "%FILE". For security reasons, it is particularly recommended to supply the KEY and SECRET arguments in such a file, rather than directly on the command line:

Create a file named, e.g., godaddy-ddns.config with the content:

 MY.FULLY.QUALIFIED.HOSTNAME.COM
 --key
 MY-KEY-FROM-GODADDY
 --secret
 MY-SECRET-FROM-GODADDY

Then just invoke godaddy-ddns %godaddy-ddns.config

Credits and Thanks

  • thatjpk for providing an example of this type of script.
  • GoDaddy for having an API.
  • icanhazip.com for making grabbing your public IP from a script super easy.
  • dhowdy for supplying a fix to problem with updating root DNS record.
  • ChrisSwanson for icanhazip.com https patch.
  • cwilby for providing a Docker image of this script.

godaddy-ddns's People

Contributors

carledman avatar koksnuss avatar cwilby avatar chrisswanson avatar mgrankin avatar mmponn 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.