Coder Social home page Coder Social logo

netlify-dynamic-dns's Introduction

Netlify Dynamic DNS

A simple command line tool for updating a Netlify's Managed DNS record to point at your public IP address. Supporting both IPv4 and IPv6.

Installation & Usage

# Install via script
curl -s -L https://raw.githubusercontent.com/oscartbeaumont/netlify-dynamic-dns/master/install.sh | sudo sh

# Set home.example.com to your public IP and quit
nddns -accesstoken xxx -zone example.com -record home

# Set home.example.com to your pulbic IP every 5 minutes
nddns -accesstoken xxx -zone example.com -record home -interval 5

# Using Docker
docker run ghcr.io/oscartbeaumont/netlify-dynamic-dns:latest -accesstoken xxx -zone example.com -record home -interval 5

# From Git
git clone https://github.com/oscartbeaumont/netlify-dynamic-dns.git
cd netlify-dynamic-dns
go run ./cmd -accesstoken xxx -zone example.com -record home

Configuration

Flag Environment Variable Default Description
access-token NDDNS_ACCESS_TOKEN Your Netlify personal access token. Can be created at here
zone NDDNS_ZONE example.com The Netlify DNS zone domain name
record NDDNS_RECORD home The record in the DNS zone to set as your public IP
ipv6 NDDNS_IPv6_ENABLED true Whether the IPv6 record (AAAA) should also be updated
interval NDDNS_INTERVAL 0 The amount of minutes between sending updates. If 0 only a single update is done.

If you would like a custom TTL value, create an existing record (you can set anything in the IP field) and then the application will use it when recreating the record.

How It Works

Netlify Dynamic DNS uses the OpenDNS resolver to determine your public IP. The resolver has a feature which echoes the clients IP address when you lookup myip.opendns.com. This lookup is done both over IPv4 and IPv6 to determine both public IP's then using the Netlify OpenAPI Client the old DNS records are removed and new ones are created with your latest public IP.

netlify-dynamic-dns's People

Contributors

andela-oakinniranye avatar chrislewisdev avatar dependabot[bot] avatar jaffparker avatar oscartbeaumont 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.