Giter Site home page Giter Site logo

dyndns-bash's Introduction

dyndns-bash

This codebase consists of a Bash shell script with which to update a specified DNS A (alias) record contained within a specified AWS Route53 DNS zone with an optionally specified TTL (time-to-live) value (in seconds).

Requirements

Network requirements:

DNS resolution and reachability of one or more of the following domains is required (or alteration of this script to provide alternative method):

Keep in mind these services have their own terms of service; modify the IP_FUNCS array to select which ones you want.

Software dependencies

Rough list of software required:

  • Bash
  • curl
  • AWS CLI

This was developed with the following versions initially:

  • GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)
  • curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1i zlib/1.2.11 libidn2/2.3.0 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
  • OpenSSL 1.1.1i 8 Dec 2020
  • aws-cli/1.14.44 Python/3.6.9 Linux/4.4.0-19041-Microsoft botocore/1.16.19

AWS permissions

The AWS principal(s) being used must have the route53:ChangeResourceRecordSets permissions for any DNS zones you wish to modify.

Example IAM Policy:

{
   "Version": "2012-10-17",
   "Statement": [
       {
           "Sid": "allow-dyndns-bash",
           "Effect": "Allow",
           "Action": "route53:ChangeResourceRecordSets",
           "Resource": "arn:aws:route53:::hostedzone/<YOUR_ZONE_ID_HERE>"
       }
   ]
}

Invocation

Syntax:

bash dyndns.bash "<zone_id>" "<record_name> [ttl]"

For example:

bash dyndns.bash "XYZROUTE53ZONEID" "test.example.com"

Configuration

To provide AWS credentials, use environment or file-driven AWS CLI configuration as documented by Amazon.

dyndns-bash's People

Contributors

savvykms avatar

Watchers

 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.