Giter Site home page Giter Site logo

ddns-route53's Introduction

ddns-route53

Build Status GitHub Release

Simple dynamic DNS updater script using Amazon Route53.

Source is originally from Roll your own dynamic DNS service using Amazon Route53 though it's been modified to use OpenDNS for getting the current IP address, as well as usage of command line arguments and environment variables.

Requirements

  • bash
  • awscli
  • dig

Installation

curl -sLO https://github.com/mthssdrbrg/ddns-route53/raw/$VERSION/ddns-route53

The following IAM policy (or something similar) will have to be applied to an user or role. Unfortunately it's not possible to restrict access to specific resource record (yet), but a workaround is to create a "sub" hosted zone for a specific record.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "route53:ChangeResourceRecordSets",
        "route53:ListResourceRecordSets"
      ],
      "Effect": "Allow",
      "Resource": "arn:aws:route53:::hostedzone/EXAMPLE"
    }
  ]
}

Usage

$ ddns-route53 --zone-id <ZONE_ID> --record-set <RECORD_SET>

Note: long options on the form --long-option= are not supported.

The above command assumes that the necessary environment variables for awscli are set, an A type record and a TTL of 300 seconds.

See ddns-route53 --help for more information about command line arguments.

It's possible to set a number of environment variables instead of using command line arguments, though command line arguments take precedence over environment variables.

  • DDNS_ROUTE53_TTL: TTL for DNS record.
  • DDNS_ROUTE53_TYPE: DNS record type.
  • DDNS_ROUTE53_COMMENT: comment set when updating the Route53 record (only configurable as environment variable).
  • DDNS_ROUTE53_ZONE_ID: Amazon Route53 hosted zone ID.
  • DDNS_ROUTE53_RECORD_SET: Amazon Route53 record set name.
  • DDNS_ROUTE53_SCRIPT: path to script to execute on changes.

Copyright

This is free and unencumbered software released into the public domain.

See LICENSE.txt or unlicense.org for more information.

ddns-route53's People

Contributors

mthssdrbrg avatar paulbovbel avatar

Watchers

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