Code Monkey home page Code Monkey logo

godyndns's Introduction

GOdyndns

Automatically update DNS record via Digitalocean or Gandi.net API

This program lets you update a DNS entry of domains you manage via Digitalocean or Gandis v5 API It queries the current IP from icanhazip.com (currently IPv4 only), and then updates the domain record if necessary.

Usage

There are 2 modes GOdyndns can run in.

First: Update IP once and then immediately exit. For example, set up a cronjob, which then checks the IP every hour. (If the IP has not changed, the program will not call the API)

Second: Start a small Webserver, which listens on a predefined port, and updates when someone accesses the server. This can be used for example with pfsense/opnsense router, where one can configure custom dyndns services. Just run the program somwhere behind the router, then point the dyndns config to the listening port. Because godyndns currently gets the IP from icanhazip.com, it is not needed to use authentication (for now). Nevertheless, one should not run this open to the internet, so that noone can DOS the server and/or the DO-API.

Configuration

It uses a simple json settings file. Per default, the server looks at "/usr/local/etc/godyndns.json" or "./godyndns.json". Alternatively, provide a different path with -f flag.

Options:

  • domain: the base domain, set up via digitalocean or Gandi. (example.com)
  • subdomain: the subdomain which should be updated with the IP Address. (dyndns; so the updated URL would be dyndns.example.com)
  • token: the API token.
    • Needs Read/Write permissions to update the record, so this file should be guarded appropiately. (eg. chmod 600 ./godyndns.json, chmod root:wheel ./godyndns.json)
  • httpServer: boolean, wether do-dyndns should update the record once, or start a http server.
  • httpPort: port on which the server should listen on.

godyndns's People

Contributors

nudelfabrik avatar

Watchers

 avatar  avatar

godyndns's Issues

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.