项目作者: mthssdrbrg

项目描述 :
Dynamic DNS updater using AWS Route53
高级语言: Shell
项目地址: git://github.com/mthssdrbrg/ddns-route53.git
创建时间: 2016-01-01T06:45:55Z
项目社区:https://github.com/mthssdrbrg/ddns-route53

开源协议:The Unlicense

下载


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

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

  1. {
  2. "Version": "2012-10-17",
  3. "Statement": [
  4. {
  5. "Action": [
  6. "route53:ChangeResourceRecordSets",
  7. "route53:ListResourceRecordSets"
  8. ],
  9. "Effect": "Allow",
  10. "Resource": "arn:aws:route53:::hostedzone/EXAMPLE"
  11. }
  12. ]
  13. }

Usage

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

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

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