Günstiges DynDNS Marke Eigenbau

in #deutsch6 years ago

TL;DR

  • self-hosted DynDNS Client für Domains/DNS Zonen bei HEXONET
  • Simple Installation via Docker (oder ohne)
  • Privates DynDNS mit beliebig vielen Hostnamen

Disclaimer: Das hier ist meine nerdige Seite. Falls sich das unruhig liest, sorry, klären wir in den Comments ;)

Privates DynDNS bitte

Als technik- und sicherheits-affiner Abenteurer ist es für mich in vielerlei Hinsicht interessant, die Erreichbarkeit von Netzen oder Geräten über einfach zu merkende Hostnamen zu gewährleisten. Von der simplen Erreichbarkeit meines Heimnetzes ohne die ständig wechselnde IP zu kennen bis zum Betrieb eines mobilen offline-first Mail- und Kommunikations-Servers (Raspberry PI) der als MX von externen Servern ansprechbar sein muss gibt es massig Gründe, DynDNS zu verwenden.

Jetzt sind Angebote großer Provider oft mit nervigen Accounts, Limits oder hohen Kosten verbunden. Da mir auch meine Unabhängigkeit in Sachen Technik sehr viel wert ist, möchte ich etwas sensibles wie die IP Adressen meiner Netze oder Devices nicht in die Hände von großen Providern geben und dafür bezahlen, dass meine Nutzerdaten ausgewertet und monetarisiert werden.

Ein weiteres Problem das ich mit DynDNSaaS-Anbietern habe ist die oft fehlende Integration mit genau dem Gerät das ich gerade habe. Ist immer so.

Was bleibt ist eigentlich nur selber bauen. Dazu muss man lediglich ein paar Dinge wissen was DynDNS angeht.

DynDNS w00t?

Dynamisches DNS ist eigentlich ganz normales DNS, nur mit schnelleren Aktualisierungen. Technisch wirklich sehr, sehr oberflächlich könnte man DNS und DynDNS mit Premium-Subscriptions bei Software-Herstellern vergleichen:

Die Community-Version (DNS) bekommt einmal alle 48h Code-Updates, während die Premium-Version der Software (DynDNS) Updates immer in Echtzeit bekommt.

Stichwörter sind hier TTL und Caching-Nameserver, für diejenigen die das technisch mehr hinterblicken wollen.

Manche DNS Provider ermöglichen diese nahezu-Echtzeit-Updates ohne Aufpreis.

Portabilität

Da mich mitunter die mangelhaften Integrationen von DynDNS-Diensten nerven, reizt mich eine Variante, die eigentlich universal portabel ist.

Gelöst habe ich das mit einem Python-Script ohne externe Abhängigkeiten und entsprechendem Umbau für Docker.

DNS Provider

Sollte man nicht vorhaben, einen eigenen, im Internet verfügbaren DNS-Server zu betreiben (was übrigens einer der nächsten Artikel werden wird), braucht man einen DNS Provider mit API, der die Namensauflösung für einen handlet. Ich habe mich hier für HEXONET entschieden. Die Domain-Preise als End-User sind okay, aber zum einen ist es ein Prepaid-Modell, der reine Account ist kostenlos solange ich keine Domains/DNS Zonen halte und ich habe die Möglichkeit, entweder eine Domain mit kostenloser Zone oder einfach nur eine viel günstigere externe DNS Zone zu kaufen (so wie in meinem Fall). Kostet im Bestfall keine 3€ im Jahr.

Wichtig ist aber vor allem die umfangreiche API und die gnädigen Limits. Grundsätzlich könnt ihr mit einer DNS Zone unbegrenzt viele DynDNS-Hostnamen anlegen.

Aber warum?

Warum nicht? Unabhängigkeit, Spaß an der Freude und ein kleiner Schritt in eine Welt, in der man wieder mehr Gewalt über seine Privatsphäre bekommt.

Weitere Anwendungsfälle:

  • Als Container oder Cronjob auf beliebigen Servern für Auto-Discovery und -Inventory nutzbar (Consul-style)
  • Callback-Webhooks für IoT Devices
  • Aufbohren für https://blockchain-dns.info/explorer/

Beispiel am lebenden Objekt

Code und Installations-/Usage-Anleitung findet sich vollständig auf GitHub. Hier ein Quick&Dirty Beispiel für eine DNS Zone im Test-System von HEXONET:

docker build -t hexonet-dyndns github.com/WanTanFao/hexonet-dyndns
docker run -it --rm --name hexonet-dyndns -e DDNS_HOSTNAME="ddns.hexonet.net" hexonet-dyndns
2018-05-12 08:37:32,226 - INFO - Created A-Record 'ddns' in DNS Zone 'hexonet.net.': 0.0.0.0 => 46.82.111.145

Vielleicht ist es ja für den ein oder anderen reizvoll ;) Ich konnte jedenfalls mal gut abnerden.

Sort:  

Congratulations @munchiez! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:
SteemitBoard World Cup Contest - The results, the winners and the prizes

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @munchiez! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @munchiez! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @munchiez! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:
SteemFest³ - SteemitBoard support the Travel Reimbursement Fund.

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @munchiez! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @munchiez! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

SteemitBoard Ranking update - Resteem and Resteemed added

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @munchiez! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 1500 upvotes. Your next target is to reach 1750 upvotes.

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

SteemFest3 and SteemitBoard - Meet the Steemians Contest

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @munchiez! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

Are you a DrugWars early adopter? Benvenuto in famiglia!
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Congratulations @munchiez! You received a personal award!

Happy Steem Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

Downvote challenge - Add up to 3 funny badges to your board
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.18
TRX 0.13
JST 0.029
BTC 57360.07
ETH 3004.82
USDT 1.00
SBD 2.26