Coder Social home page Coder Social logo

theonemule / docker-dynamic-dns Goto Github PK

View Code? Open in Web Editor NEW
41.0 4.0 27.0 18 KB

A tiny Docker based dynamic DNS client for Duck DNS, NO-IP, and DynDNS

Shell 95.41% Dockerfile 4.59%
dynamic-dns dynamic-dns-services dynamic-dns-client dyndns duckdns no-ip

docker-dynamic-dns's Introduction

Docker Dynamic DNS Client

Docker Hub: https://hub.docker.com/r/blaize/docker-dynamic-dns/

GitHub: https://github.com/theonemule/docker-dynamic-dns

Author's Site: https://www.blaize.net

Dynamic DNS services have been around since the early days of the internet. Generally speaking, internet service providers (ISP's) will reassign an IP address to a subscriber after some period of time or if the user reconnects his or her connection. Traditional DNS services, however, relied on IP addresses staying the same. DynDNS developed an HTTP-based protocol for updating DNS records on Dynamic DNS services that has been copied for a number of platforms. One of the real advantages of Dynamic DNS nowadays is that HTTPS can now be bound to a domain name instead of an IP. Likewise, a domain name (ie. subdomain.example.com) can be bound to a dynamic DNS name in a DNS record via a CNAME. So even if one is using a Dynamic DNS, traffic can still be secured using HTTPS.

Having gotten in to Docker in recent years, I wanted to migrate my existing NO-IP script to a Docker. I modified the script to accept environmental variables as input instead of passing them on the command line and also added two services for DynDNS and DuckDNS in addition to NO-IP.

To build the Docker image, simply run Docker build

docker build --no-cache --tag docker-dynamic-dns .

Or you can pull it:

docker pull blaize/docker-dynamic-dns

To use the image, use Docker run.

docker run -it --rm --name no-ip1 -e USER=username -e PASSWORD=yourpassword -e SERVICE=duckdns -e HOSTNAME=example.com -e DETECTIP=1 -e INTERVAL=1 blaize/docker-dynamic-dns

The envitonmental variables are as follows:

  • USER: the username for the service.

  • PASSWORD: the password or token for the service.

  • HOSTNAME: The host name that you are updating. ie. example.com

  • DETECTIP: If this is set to 1, then the script will detect the external IP of the service on which the container is running, such as the external IP of your DSL or cable modem.

  • IP: if DETECTIP is not set, you can specify an IP address.

  • UPDATEIPV6: If this is set to 1, then the script will detect the external IPv6 address of the service on which the container is running.

  • INTERVAL: How often the script should call the update services in minutes.

  • SERVICE: The service you are using. Currently, the script is setup to use Google Domains (google), DuckDNS (duckdns), DynDNS (dyndns), and NO-IP (noip). Set the service to the value in parenthesis.

That's it. Please comment below if there are other services using the DynDNS protocol you would like me to add.

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.