GithubHelp home page GithubHelp logo

sietset / ip-dns-sync Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 94 KB

Automatically update your hosting providers' DNS records to your public IP address

License: MIT License

PowerShell 1.82% Dockerfile 1.16% C# 97.02%

ip-dns-sync's Introduction

ip-dns-sync

Keeps your (public) DNS records up-to-date whenever you have a dynamic IP address. Never lose external access again when your ISP decides to change your external IP address.

Docker Hub: https://hub.docker.com/r/sietsetro/ip-dns-sync



Features

  • Automatically checks if your external IP address has changed and updates specified A records for your DNS provider
  • Support for multiple DNS providers Currently only TransIP though, but it is easy to add other providers
  • Cross-platform support - runs as Docker container

Usage

The Docker image of ip-dns-sync is published to Docker Hub and can either be run as a standalone Docker command, or via Docker Compose.

Docker run:

docker run sietsetro/ip-dns-sync:latest

The examples directory contains an example of a Docker Compose file:

services:
  ip-dns-sync:
    container_name: ip-dns-sync
    image: sietsetro/ip-dns-sync:latest
    restart: always

Note that the above examples do not have any DNS providers configured. Starting the container this way will result in an error during startup.


Configuration

Several settings can be configured to modify the behavior the tool. These should be set as environment variables.

Environment variable Purpose Default
Settings__UpdateIntervalInMinutes Time between checks 5

For configuring providers, please refer to providers.


Providers

This section describes how to configure each DNS provider.

TransIP

To be able to access the TransIP API using your account, you need to create a Key Pair in the TransIP control panel:

  1. Go to https://www.transip.nl/cp/account/api/
  2. Under Key Pairs:
    1. Fill in the Label (e.g. ip-dns-sync) field
    2. Tick or untick the checkbox to limit access to the TransIP API only from specified IP addresses. This is up to you.
    3. Add the Key Pair.
  3. The private key is now visible on the page. This is the only time it is visible. So copy it now and store it somewhere safe.

Now that you have a private key, you can add the necessary environment variables to configure the TransIP provider:

Environment variable Purpose
Providers__TransIP__Username Your TransIP username
Providers__TransIP__PrivateKey The private key that you created earlier
Providers__TransIP__Domains__0 The domain(s) you would like to keep in sync with your external IP address. This can be either a rootdomain or subdomain (example.com or sub.example.com). To specify multiple domains, simply add a new environment variable and increment the number at the end. For example: Providers__TransIP__Domains__1

The code below shows a fully configurated Docker Compose file with the TransIP provider configured:

services:
  ip-dns-sync:
    container_name: ip-dns-sync
    image: sietsetro/ip-dns-sync:latest
    environment:
      Providers__TransIP__Domains__0: example.com
      Providers__TransIP__Domains__1: sub.example.com
      Providers__TransIP__Username: ExampleUser
      Providers__TransIP__PrivateKey: |
        -----BEGIN PRIVATE KEY-----
        Your very secret private key
        -----END PRIVATE KEY-----
    restart: always

ip-dns-sync's People

Contributors

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