All Projects → dprandzioch → Docker Ddns

dprandzioch / Docker Ddns

Licence: mit
Easy-to-deploy dynamic DNS with Docker, Go and Bind9

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Docker Ddns

Blocky
Fast and lightweight DNS proxy as ad-blocker for local network with many features
Stars: ✭ 523 (+33.42%)
Mutual labels:  self-hosted, selfhosted, dns
Ownhealthrecord
This repository is about the OwnHealthRecord Application Web App
Stars: ✭ 162 (-58.67%)
Mutual labels:  self-hosted, selfhosted
Personal Management System
Your web application for managing personal data. <[email protected]>
Stars: ✭ 2,027 (+417.09%)
Mutual labels:  self-hosted, selfhosted
uptime-kuma
A fancy self-hosted monitoring tool
Stars: ✭ 27,425 (+6896.17%)
Mutual labels:  selfhosted, self-hosted
Docker Swarm Cookbook
A large collection of recipes for a complete, self-hosted Docker Swarm stack including Traefik v2 and SSO/Auth
Stars: ✭ 49 (-87.5%)
Mutual labels:  self-hosted, selfhosted
Gokapi
Lightweight selfhosted Firefox Send alternative without public upload
Stars: ✭ 84 (-78.57%)
Mutual labels:  self-hosted, selfhosted
Awesome Selfhosted
A list of Free Software network services and web applications which can be hosted on your own servers
Stars: ✭ 70,996 (+18011.22%)
Mutual labels:  self-hosted, selfhosted
Dank Selfhosted
Automated solution for hosting email, web, DNS, XMPP, and ZNC on OpenBSD.
Stars: ✭ 800 (+104.08%)
Mutual labels:  self-hosted, dns
gatus
⛑ Automated service health dashboard
Stars: ✭ 3,018 (+669.9%)
Mutual labels:  selfhosted, self-hosted
zusam
Private groups to share messages, photos, videos, links with friends and family.
Stars: ✭ 79 (-79.85%)
Mutual labels:  selfhosted, self-hosted
alternative-frontends
🔐🌐 Privacy-respecting web frontends for popular services
Stars: ✭ 821 (+109.44%)
Mutual labels:  selfhosted, self-hosted
Cve Api
Unofficial api for cve.mitre.org
Stars: ✭ 36 (-90.82%)
Mutual labels:  self-hosted, selfhosted
Passwordcockpit
Passwordcockpit is a simple, free, open source, self hosted, web based password manager for teams. It is made in PHP, Javascript, MySQL and it run on a docker service. It allows users with any kind of device to safely store, share and retrieve passwords, certificates, files and much more.
Stars: ✭ 34 (-91.33%)
Mutual labels:  self-hosted, selfhosted
Reminiscence
Self-Hosted Bookmark And Archive Manager
Stars: ✭ 1,303 (+232.4%)
Mutual labels:  self-hosted, selfhosted
Yunohost
YunoHost is an operating system aiming to simplify as much as possible the administration of a server. This repository corresponds to the core code, written mostly in Python and Bash.
Stars: ✭ 832 (+112.24%)
Mutual labels:  self-hosted, selfhosted
Server
self-hosted tag-based time tracking
Stars: ✭ 238 (-39.29%)
Mutual labels:  self-hosted, selfhosted
swetrix-js
The JavaScript analytics client for Swetrix Analytics
Stars: ✭ 28 (-92.86%)
Mutual labels:  selfhosted, self-hosted
Server
A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui)
Stars: ✭ 6,858 (+1649.49%)
Mutual labels:  self-hosted, selfhosted
wake-pc
Wake PC is a tiny self-hosted Wake-On-Lan (WOL) app written in PHP for linux machines that you can use to wake up machines on your local network.
Stars: ✭ 44 (-88.78%)
Mutual labels:  selfhosted, self-hosted
devliver
Your private self hosted composer repository with user management
Stars: ✭ 50 (-87.24%)
Mutual labels:  selfhosted, self-hosted

Dynamic DNS with Docker, Go and Bind9

DockerHub build status Travis build status

This package allows you to set up a dynamic DNS server that allows you to connect to devices at home from anywhere in the world. All you need is a cheap VPS, a domain and access to it's nameserver.

Connect to your NAS from work

Installation

You can either take the image from DockerHub or build it on your own.

Using DockerHub

Just customize this to your needs and run:

docker run -it -d \
    -p 8080:8080 \
    -p 53:53 \
    -p 53:53/udp \
    -e SHARED_SECRET=changeme \
    -e ZONE=example.org \
    -e RECORD_TTL=3600 \
    --name=dyndns \
    davd/docker-ddns:latest

If you want to persist DNS configuration across container recreation, add -v /somefolder:/var/cache/bind. If you are experiencing any issues updating DNS configuration using the API (NOTAUTH and SERVFAIL), make sure to add writing permissions for root (UID=0) to your persistent storage (e.g. chmod -R a+w /somefolder).

You can also use Compose / Swarm to set up this project. For more information and an example docker-compose.yml with persistent data storage, please refer to this file: https://github.com/dprandzioch/docker-ddns/blob/master/docker-compose.yml

Build from source / GitHub

git clone https://github.com/dprandzioch/docker-ddns
git checkout master # Make sure to build the latest stable release
cd docker-ddns
$EDITOR envfile
make deploy

Make sure to change all environment variables in envfile to match your needs. Some more information can be found here: https://www.davd.io/build-your-own-dynamic-dns-in-5-minutes/

Exposed ports

Afterwards you have a running docker container that exposes three ports:

  • 53/TCP -> DNS
  • 53/UDP -> DNS
  • 8080/TCP -> Management REST API

Using the API

That package features a simple REST API written in Go, that provides a simple interface, that almost any router that supports Custom DDNS providers can attach to (e.g. Fritz!Box). It is highly recommended to put a reverse proxy before the API.

It provides one single GET request, that is used as follows:

http://myhost.mydomain.tld:8080/update?secret=changeme&domain=foo&addr=1.2.3.4

Fields

  • secret: The shared secret set in envfile
  • domain: The subdomain to your configured domain, in this example it would result in foo.example.org. Could also be multiple domains that should be redirected to the same domain separated by comma, so "foo,bar"
  • addr: IPv4 or IPv6 address of the name record

For the DynDNS compatible fields please see Dyn's documentation here:

https://help.dyn.com/remote-access-api/perform-update/

DynDNS compatible API

This package contains a DynDNS compatible handler for convenience and for use cases where clients cannot be modified to use the JSON responses and/or URL scheme outlined above.

This has been tested with a number of routers. Just point the router to your DDNS domain for updates.

The handlers will listen on:

  • /nic/update
  • /v2/update
  • /v3/update

The username is not validated at all so you can use anything as a username Password is the shared secret provided as an ENV variable

Examples

An example on the ddclient (Linux DDNS client) based Ubiquiti router line:

set service dns dynamic interface eth0 service dyndns host-name set service dns dynamic interface eth0 service dyndns login set service dns dynamic interface eth0 service dyndns password set service dns dynamic interface eth0 service dyndns protocol dyndns2 set service dns dynamic interface eth0 service dyndns server

Optional if you used this behind an HTTPS reverse proxy like I do:

set service dns dynamic interface eth0 service dyndns options ssl=true

This also means that DDCLIENT works out of the box and Linux based devices should work.

D-Link DIR-842:

Another router that has been tested is from the D-Link router line where you need to fill the details in on the Web Interface. The values are self-explanatory. Under the server (once you chosen Manual) you need to enter you DDNS server's hostname or IP. The protocol used by the router will be the dyndns2 by default and cannot be changed.

Accessing the REST API log

Just run

docker logs -f dyndns

DNS setup

To provide a little help... To your "real" domain, like domain.tld, you should add a subdomain that is delegated to this DDNS server like this:

dyndns                   IN NS      ns
ns                       IN A       <put ipv4 of dns server here>
ns                       IN AAAA    <optional, put ipv6 of dns server here>

Your management API should then also be accessible through

http://ns.domain.tld:8080/update?...

If you provide foo as a domain when using the REST API, the resulting domain will then be foo.dyndns.domain.tld.

Common pitfalls

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].