site-josuah

/usr/josuah
Log | Files | Refs

commit 39e2e1d423ac5e1f39e8189c865133b5ecd3dde5
parent 1b991875830c8e6e3ceda3840a9f773cbf7c26dc
Author: Josuah Demangeon <me@josuah.net>
Date:   Mon, 20 Apr 2020 02:32:21 +0200

wiki/tinydns: remove all arguing and keep only information

Diffstat:
Mwiki/tinydns/index.md | 45++++++++++++++++++++-------------------------
1 file changed, 20 insertions(+), 25 deletions(-)

diff --git a/wiki/tinydns/index.md b/wiki/tinydns/index.md @@ -3,28 +3,22 @@ Configuration of [[tinydns]] [tinydns]: https://cr.yp.to/djbdns.html -To run nameservers, you need to maintain a bunch of interdependent DNS -information: +To run nameservers, you need to maintain a bunch of interdependent DNS +information. - * You first need NS entries that tells who resolve the domain. +To achieve this, I write small input files that end up in data.cdb, read +by the tinydns program: - * You then need A and AAAA entries for those NS entries so that one can join - the nameservers. + (text) + rr.domain ┐ (text) (binary) + rr.host │ ┌────────┐ ┌────────────┐ + rr.mx ├─┤data.awk├─> data >─┤tinydns-edit├─> data.cdb + rr.ns │ └────────┘ └────────────┘ + rr.alias ┘ - * It is good practice to keep PTR entries. - - * You will then have MX entries so you can receive e-mail. - - * Finally you have a basic setup, you can add your A entries. But wait, do I - setup matching PTR entries for these A entries? There are already PTR - entries on some of these IPs. - -To achieve this, I use these *input files*, that get converted into ./data by -an awk script [[data.awk]], and publish from a [[push.awk]], both run from a -[[Makefile]]. +The whole chain is controlled by a small [[Makefile]]. [data.awk]: /wiki/tinydns/data.awk -[push.awk]: /wiki/tinydns/push.awk [makefile]: /wiki/tinydns/Makefile @@ -78,13 +72,14 @@ A list of regular domain records for your various servers and services. You may kuntur josuah.z0.is -Maintaining records -------------------- -"make push" update all necessary parts and calls push.awk, which looks at the -rr.host to get the IPs, and rr.ns for where to deploy them, then scp data.cdb -to all nameserver found. +Uploading data.cdb to nameservers +--------------------------------- +"make push" update all necessary parts to build data.cdb as seen above, then +calls [[push.awk]]. -This effectively update the DNS records sending about 5KB of data over SSH: -about 1.50 second over a DSL line for 2 nameservers. +[push.awk]: /wiki/tinydns/push.awk -This permits to bootstrap DNS data without the need to configure /etc/hosts. +push.awk copies data.cdb to each nameserver in rr.ns, using the IP found in +rr.host (so even if your DNS is down, you can still update it from remote). +This example sends about 10KB over SSH in total, about 1.50 second over a DSL +line for 2 nameservers.