GithubHelp home page GithubHelp logo

simhaonline / waldo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jforman/waldo

0.0 1.0 0.0 7 KB

Detect external Internet IP address changes from any machine, and update a DNS entry in a Google Cloud DNS Managed Zone with that new IP address.

License: MIT License

Go 92.13% Dockerfile 5.09% Shell 2.79%

waldo's Introduction

Waldo

Detect external Internet IP address changes from any machine, and update a DNS entry in a Google Cloud DNS Managed Zone with that new IP address.

Problem Statement

I moved from having a static IPv4 public IP address on my home Internet connection, to having a dynamic IPv4 address. How was I going to be able to figure out the IP address to SSH into if it could possibly change?

There must be a way to detect if has changed, and update my DNS records accordingly.

Run Locally

  1. Configure Application Default Credentials for your Google Cloud Project.
  2. Download the resulting JSON file to your local machine.
  3. Determine a DNS entry that will be updated in the managed zone.
  4. Run binary.
go run waldo.go --credentialsPath adc.json --managedZone $ZONEFROMCLOUDDNS --project $PROJECTNAME --recordName fqdn.to.keep.updated.tld

Run On Kubernetes

First, you need to create a secret containing your service account credentials.

kubectl create secret generic waldo-creds --from-file=waldo-creds.json

Edit waldo-deployment.yaml to contain your zone name, record name. etc.

Then create the deployment.

kubectl apply -f waldo-deployment.yaml

Command Line Flags

-credentialsPath string
  Path to JSON credentials file for updating DNS.
-managedZone string
  Zone name in Google Cloud DNS.
-project string
  Project name within Google Cloud associated with Managed Zone.
-recordName string
  DNS Host Resource Record to Update in Cloud DNS.
-recordType string
  RR Datatype for the DNS record. (default "A")
-recordttl int
  TTL (minutes) for the DNS record TTL (default 60)
-waitDuration duration
  Interval in seconds to check public IP address. (default 5m0s)

Future plans when time permits.

  • Dry run support for Record Adds and Deletes.
  • Handle both IPv4 and IPv6.
  • Notification Upon IP Change: Slack, Email, IRC, SMS

References Used in Development

waldo's People

Contributors

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