Mastodon

Fritz-DNS – An authoritative DNS server for AVM FRITZ!Box routers

AVM FRITZ!Box Cable 6591

In my home network, I am using an AVM FRITZ!Box Cable 6690. It handles DHCP, DNS, Wifi and recently also interfaces my home network via WireGuard to my servers.

Just like the venerable Dnsmasq AVM’s FRITZ!OS uses hostnames learned from its DHCP leases and makes them resolvable via its internal DNS server.

Unfortunately, this feature in FRITZ!OS has some limitations:

  1. The name of the DNS Zone is hard coded to fritz.box and can not be adjusted. Hence, the resolvable names have the following schema: myhostname.fritz.box
  2. The internal DNS server only supports recursive DNS looks. It does not act as an authoritative DNS server. Hence the local zone can not be delegated.
  3. AXFR zone transfers are not supported.

My solution to these shortcomings is Fritz-DNS which:

  • is a small tool written in the Go programming language.
  • is a small authoritative DNS server which serves A/AAAA resource records for local hosts connected to an AVM Fritz Box home WiFi router.
  • can be used in a hidden master configuration as it supports AXFR zone transfers.
  • uses the custom extension (X_AVM-DE_GetHostListPath) of the TR-064 Hosts SOAP-API as documented here to retrieve a list of local hosts.
  • supports the generation of AAAA (IPv6) resource records based on the hosts MAC addresses using 64-Bit Extended Unique Identifier (EUI-64) and a configured unique local address (ULA) prefix.
  • does not yet support PTR resource records (to be implemented…)
  • is licensed under the Apache 2.0 license

You can find Fritz-DNS at GitHub: https://github.com/stv0g/fritz-dns

Here is a small figure illustrating the interaction of Fritz-DNS with the Fritz!Box and other DNS servers / clients:

CLI Usage

Usage of fritz-dns
  -ipv6-ula-prefix string
    	Fritz Box IPv6 ULA Prefix (default "fd00::/64")
  -pass string
    	FritzBox password
  -port int
    	Listen port (default 53)
  -soa-expire duration
    	SOA expire value (default 744h0m0s)
  -soa-mbox string
    	SOA mailbox value
  -soa-minttl duration
    	SOA minimum TTL value (default 1h0m0s)
  -soa-ns string
    	Authorative DNS server for the zone
  -soa-refresh duration
    	SOA refresh value (default 2h0m0s)
  -soa-retry duration
    	SOA retry value (default 1h0m0s)
  -ttl duration
    	default TTL values for records (default 5m0s)
  -url string
    	FritzBox URL (default "http://fritz.box/")
  -user string
    	FritzBox username (default "admin")
  -zone string
    	DNS Zone (default "fritz.box.")

Tiny DNS & URL aka SDDNS

Zusammen mit Micha besuchte ich Ende letzten Jahres das U23 des C4 in Köln.
Dort habe ich viel über die Techniken des Internets gelernt. Unter anderem ging es hier auch um das Domain Name System, das für die Namensauflösung im Internet verantwortlich ist.

Mittlerweile betreibe ich einen eigenen DNS Server für meine Domains: 0l.de, steffenvogel.de, griesm.de & vogel.cc.

Zudem biete ich euch kostenloses DNS Hosting. Gerne übernehme ich auch die DNS Administration eurer Domains. Jedoch könnt ihr sicherlich verstehen, dass ich euch dafür dann nichts garantieren kann.

Mit der Zeit habe ich ein Webinterface für den DNS Server Bind entwickelt auf das nun jeder Zugriff hat. Ihr könnt eigene Subdomains registrieren, Records setzen und URL Weiterleitungen einrichten. Dynamisches DNS wird ebenso unterstützt.

Es ist auch möglich URLs zu verkürzen und so beispielsweise die URL:
http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=100237997621038330776.000468b0a95f89721a96e&ll=18.646245,15.820313&spn=120.933723,198.632813&z=3
auf
http://a.0l.de

abzukürzen.  Das ist vergleichbar mit dem Service von TinyURL. Jedoch sind meine URLs dann um 7 Zeichen kürzer :). Im Gegensatz TinyURL sind meine URLs auch nur über die Subdomains erreichbar. Eine direkte Unterscheidung zwischen eigenem DNS Record und einer simplen URL Weiterleitung ist also nicht möglich.

ServiceWiki/Doku

Tiny DNS & URL aka SDDNS weiterlesen