<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Dns on Miek Gieben</title>
    <link>https://miek.nl/tags/dns/</link>
    <description>Recent content in Dns on Miek Gieben</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>© Copyright 2007-2024 Miek Gieben</copyright>
    <lastBuildDate>Fri, 15 Jul 2022 11:59:24 +0000</lastBuildDate>
    <atom:link href="https://miek.nl/tags/dns/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>A miekg/dns v2 package?</title>
      <link>https://miek.nl/2022/july/15/a-miekg/dns-v2-package/</link>
      <pubDate>Fri, 15 Jul 2022 11:59:24 +0000</pubDate>
      <guid>https://miek.nl/2022/july/15/a-miekg/dns-v2-package/</guid>
      <description>&lt;p&gt;A DNS v2 library exists at &lt;a href=&#34;https://codeberg.org/miekg/dns&#34;&gt;https://codeberg.org/miekg/dns&lt;/a&gt;. And it&amp;rsquo;s fucking fast, &lt;s&gt;360K&lt;/s&gt; 410K qps with&#xA;UDP (on arm64) machines.&lt;/p&gt;&#xA;&lt;p&gt;It:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Still uses Go structs (the naive thing I tested with a 100% binary format was dog slow), so no builder&#xA;method.&lt;/li&gt;&#xA;&lt;li&gt;Does the header/rdata split in RRs, with an rdata sub-package that contains the rdata. This solves the&#xA;&lt;code&gt;CopyWith&lt;/code&gt; and &lt;code&gt;CopyWithout&lt;/code&gt; alluded below.&lt;/li&gt;&#xA;&lt;li&gt;EDNS0 pseudo records are now also RRs.&lt;/li&gt;&#xA;&lt;li&gt;Contains a Data &lt;code&gt;[]byte&lt;/code&gt; slice in Msg, to &lt;em&gt;do&lt;/em&gt; reference wire-format.&lt;/li&gt;&#xA;&lt;li&gt;Many, many, ease of use functions and sub packages, such as &lt;code&gt;dnstest&lt;/code&gt;, &lt;code&gt;dnsutil&lt;/code&gt;, &lt;code&gt;dnsconf&lt;/code&gt;, etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;While browsing, I stumbled upon &lt;a href=&#34;https://pkg.go.dev/golang.org/x/net/dns/dnsmessage#Builder&#34;&gt;https://pkg.go.dev/golang.org/x/net/dns/dnsmessage#Builder&lt;/a&gt; and I&#xA;can see that is a way quicker way to create a DNS message. This made me think about a miekg/dns.v2&#xA;package again and what that should fix. I think it&amp;rsquo;s indeed better to just retain the wire format at&#xA;all times as this is faster - although just working with a Go struct is very much a joy. Also begs&#xA;the question: &amp;ldquo;Is it really that slow?&amp;rdquo; (compression on large messages is slow, memory use will def.&#xA;be higher in current miekg/dns).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Internet Days</title>
      <link>https://miek.nl/2021/december/02/internet-days/</link>
      <pubDate>Thu, 02 Dec 2021 16:00:59 +0000</pubDate>
      <guid>https://miek.nl/2021/december/02/internet-days/</guid>
      <description>&lt;p&gt;On the 22nd of November (2021) I gave a virtual presentation for the Swedish &lt;a href=&#34;https://internetdagarna.se/english/&#34;&gt;The Internet&#xA;Days&lt;/a&gt; conference.&lt;/p&gt;&#xA;&lt;p&gt;My talk was about CoreDNS: &amp;ldquo;Origin, Architecture and Usage&amp;rdquo;. Here is the PDF of that presentation.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://www.miek.nl/downloads/2021/coredns.pdf&#34;&gt;CoreDNS: Origin, Architecture and Usage&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DNS with K3s and systemk</title>
      <link>https://miek.nl/2021/january/18/dns-with-k3s-and-systemk/</link>
      <pubDate>Mon, 18 Jan 2021 09:38:37 +0000</pubDate>
      <guid>https://miek.nl/2021/january/18/dns-with-k3s-and-systemk/</guid>
      <description>&lt;p&gt;In a DNS zone that I had laying around, I&amp;rsquo;ve come with the following scheme to have a working&#xA;DNS with systemk. Note this does &lt;em&gt;not&lt;/em&gt; deal with the control plane, those are routed via tailscale and&#xA;I&amp;rsquo;m using IP addresses there. If naming is required here, it can be fitted in the scheme as well.&lt;/p&gt;&#xA;&lt;p&gt;Using &lt;code&gt;example.org&lt;/code&gt; as the domain here.&lt;/p&gt;&#xA;&lt;h2 id=&#34;scheme&#34;&gt;Scheme&lt;/h2&gt;&#xA;&lt;p&gt;An &lt;code&gt;m&lt;/code&gt; &amp;ldquo;subdomain&amp;rdquo; (it&amp;rsquo;s not delegated) holds all the names and IP address of the machines of&#xA;interest.&lt;/p&gt;</description>
    </item>
    <item>
      <title>A Working Sign Plugin in CoreDNS</title>
      <link>https://miek.nl/2019/august/03/a-working-sign-plugin-in-coredns/</link>
      <pubDate>Sat, 03 Aug 2019 08:10:10 +0000</pubDate>
      <guid>https://miek.nl/2019/august/03/a-working-sign-plugin-in-coredns/</guid>
      <description>&lt;p&gt;This &lt;em&gt;sign&lt;/em&gt; plugin is working! I&amp;rsquo;m running it live for miek.nl on my servers to test it out.&#xA;(See &lt;a href=&#34;https://github.com/coredns/coredns/tree/dnssec-file/plugin/sign&#34;&gt;this branch&lt;/a&gt; or &lt;a href=&#34;https://github.com/coredns/coredns/tree/master/plugin/sign&#34;&gt;this&#xA;one&lt;/a&gt; after it is merged into&#xA;master.)&lt;/p&gt;&#xA;&lt;p&gt;To use the &lt;em&gt;sign&lt;/em&gt; plugin, I only need a few extra lines in my Corefile:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-txt&#34; data-lang=&#34;txt&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;miek.nl {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    file /var/lib/coredns/db.miek.nl.signed&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    sign /etc/coredns/zones/miek.nl {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        key file /etc/coredns/zones/keys/Kmiek.nl.+008+33694&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        directory /var/lib/coredns&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This resigns the miek.nl zone ever so often. Logging will tell you what&amp;rsquo;s happening with your&#xA;zonefile. In this case this it skips signing:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Signing in CoreDNS</title>
      <link>https://miek.nl/2019/july/01/signing-in-coredns/</link>
      <pubDate>Mon, 01 Jul 2019 17:27:12 +0000</pubDate>
      <guid>https://miek.nl/2019/july/01/signing-in-coredns/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m pondering adding a new &lt;a href=&#34;https://coredns.io/plugins&#34;&gt;plugin&lt;/a&gt; to CoreDNS that automatically&#xA;signs DNS zones.&lt;/p&gt;&#xA;&lt;p&gt;This new plugin will be called &lt;a href=&#34;https://github.com/coredns/coredns/pull/2949&#34;&gt;&lt;em&gt;sign&lt;/em&gt;&lt;/a&gt;. I tried to&#xA;prototype the README.md in that PR, as I like to start with the documentation when designing something&#xA;new. It will do the bare minimum to give you &amp;ldquo;good DNSSEC&amp;rdquo; and will not implement key rollovers, nor&#xA;the KSK/ZSK split. It will, however, add CDS records to your zone for easier interaction with your&#xA;parent zone. Sign with a CSK, and use a proper new algorithm like ECDSA.&lt;/p&gt;</description>
    </item>
    <item>
      <title>IETF 101 DNS Hackathon Results</title>
      <link>https://miek.nl/2018/march/19/ietf-101-dns-hackathon-results/</link>
      <pubDate>Mon, 19 Mar 2018 07:27:00 +0000</pubDate>
      <guid>https://miek.nl/2018/march/19/ietf-101-dns-hackathon-results/</guid>
      <description>&lt;p&gt;The IETF 101 &lt;a href=&#34;https://www6.ietf.org/hackathon/101-hackathon.html&#34;&gt;hackathon&lt;/a&gt; has come and gone.&#xA;I wanted to write up the results of this. See my &lt;a href=&#34;https://miek.nl/2018/february/19/ietf-101-dns-hackathon/&#34;&gt;original&#xA;plan&lt;/a&gt; for the hackathon.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Implement DOH (DNS over HTTPs). Go DNS already implements DNS over TLS, so this shouldn&amp;rsquo;t be&#xA;too hard&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This turned out to be &amp;ldquo;too hard&amp;rdquo; (who would have guessed?). Basically DNS over HTTPS (DoH) doesn&amp;rsquo;t&#xA;map to proper DNS &lt;em&gt;at all&lt;/em&gt;. See &lt;a href=&#34;https://www.ietf.org/mail-archive/web/doh/current/msg00285.html&#34;&gt;my write up to the DoH mailing&#xA;list&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>IETF 101 DNS Hackathon</title>
      <link>https://miek.nl/2018/february/19/ietf-101-dns-hackathon/</link>
      <pubDate>Mon, 19 Feb 2018 10:27:00 +0000</pubDate>
      <guid>https://miek.nl/2018/february/19/ietf-101-dns-hackathon/</guid>
      <description>&lt;p&gt;The IETF 101 meeting is in London, and while I&amp;rsquo;m not going to the entire meeting, I thought it would&#xA;be nice to go to the &lt;a href=&#34;https://www6.ietf.org/hackathon/101-hackathon.html&#34;&gt;hackathon&lt;/a&gt; and work on&#xA;&lt;a href=&#34;https://github.com/miekg/dns&#34;&gt;Go DNS&lt;/a&gt; a bit.&lt;/p&gt;&#xA;&lt;p&gt;This hackathon takes place in the weekend (and is free of charge, you&amp;rsquo;ll only need to register), so&#xA;this leaves two days of &lt;del&gt;hacking&lt;/del&gt;^W careful coding.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m planning to work on the following bits:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Implement DOH (DNS over HTTPs). Go DNS already implements DNS over TLS, so this shouldn&amp;rsquo;t be too&#xA;hard (famous last words). The plan here would be:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Extend the &lt;code&gt;Net&lt;/code&gt; value in both Client and Server to include &lt;code&gt;https&lt;/code&gt; variant.&lt;/li&gt;&#xA;&lt;li&gt;Testing the client against one of the existing server implementations.&lt;/li&gt;&#xA;&lt;li&gt;Getting Server side support going.&lt;/li&gt;&#xA;&lt;li&gt;Unit tests&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;ol start=&#34;2&#34;&gt;&#xA;&lt;li&gt;Time permitting implement gRPC in Go DNS in a &amp;ldquo;plug in my own transport&amp;rdquo; fashion. We use gRPC in&#xA;&lt;a href=&#34;https://coredns.io&#34;&gt;CoreDNS&lt;/a&gt; and having it move to Go DNS would make life simpler. Of course DNS&#xA;over gRPC is not a standard, so this needs to be pluggeable (there is not exact plan for this).&lt;/li&gt;&#xA;&lt;li&gt;As these things all use TCP, it might also be worth looking a connection pooling. This is&#xA;implemented in a CoreDNS plugin, called&#xA;&lt;a href=&#34;https://github.com/coredns/coredns/tree/master/plugin/forward&#34;&gt;forward&lt;/a&gt;.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Check if it makes sense to do in the Go DNS library.&lt;/li&gt;&#xA;&lt;li&gt;Make a plan.&lt;/li&gt;&#xA;&lt;li&gt;Implement.&lt;/li&gt;&#xA;&lt;li&gt;Profit.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;if-you-are-in-the-neighborhood-and-know-a-bit-of-go-youre-welcome-to-help&#34;&gt;If you are in the neighborhood and know a bit of &lt;a href=&#34;https://golang.org&#34;&gt;Go&lt;/a&gt;, you&amp;rsquo;re welcome to help!&lt;/h2&gt;</description>
    </item>
    <item>
      <title>Running CoreDNS as a Forwarder in Kubernetes</title>
      <link>https://miek.nl/2018/january/13/running-coredns-as-a-forwarder-in-kubernetes/</link>
      <pubDate>Sat, 13 Jan 2018 10:38:37 +0000</pubDate>
      <guid>https://miek.nl/2018/january/13/running-coredns-as-a-forwarder-in-kubernetes/</guid>
      <description>&lt;p&gt;This post details how I got CoreDNS running as a forwarder in a &lt;a href=&#34;https://k8s.io&#34;&gt;Kubernetes&lt;/a&gt; cluster.&#xA;There were several problems that stood in the way of this goal:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Having (and building) a cluster out of Raspberry PIs.&lt;/li&gt;&#xA;&lt;li&gt;Making load balancing possible in a non-cloud environment.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;See &lt;a href=&#34;https://github.com/google/metallb&#34;&gt;https://github.com/google/metallb&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Extending CoreDNS with a plugin that could communicate with 9.9.9.9 using&#xA;&lt;a href=&#34;https://tools.ietf.org/html/rfc7858&#34;&gt;DNS-over-TLS&lt;/a&gt;.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;See &lt;a href=&#34;https://github.com/coredns/forward&#34;&gt;https://github.com/coredns/forward&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Building arm docker containers on amd64.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;See &lt;a href=&#34;https://github.com/miekg/dxbuild&#34;&gt;https://github.com/miekg/dxbuild&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Having a (simple) CI system to build (Docker) images and version the k8s manifests.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;No published repository, see various gists referenced in this document.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;cluster&#34;&gt;Cluster&lt;/h2&gt;&#xA;&lt;p&gt;I bought 4 PIs, some nice Corkea cases, an Anker USB power supply and power- and&#xA;network cables. Then it is just a matter if putting everything together and building the cluster.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Debian Package For Coredns 1.0.0</title>
      <link>https://miek.nl/2017/december/02/debian-package-for-coredns-1.0.0/</link>
      <pubDate>Sat, 02 Dec 2017 07:59:36 +0000</pubDate>
      <guid>https://miek.nl/2017/december/02/debian-package-for-coredns-1.0.0/</guid>
      <description>&lt;p&gt;With the &lt;a href=&#34;https://github.com/coredns/deployment&#34;&gt;deployment repo&lt;/a&gt; you can easily make your own&#xA;Debian packages for CoreDNS; i.e. &lt;code&gt;make debian&lt;/code&gt; should create packages for amd64, arm64 and armhf.&#xA;It just did that for &lt;a href=&#34;https://coredns.io/2017/12/01/coredns-1.0.0-release/&#34;&gt;our 1.0.0 release&lt;/a&gt;&#xA;and you can download them here:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/downloads/2017/coredns_1.0.0-0~9.20_amd64.deb&#34;&gt;coredns_1.0.0-0~9.20_amd64.deb&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/downloads/2017/coredns_1.0.0-0~9.20_arm64.deb&#34;&gt;coredns_1.0.0-0~9.20_arm64.deb&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/downloads/2017/coredns_1.0.0-0~9.20_armhf.deb&#34;&gt;coredns_1.0.0-0~9.20_armhf.deb&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Switching to Vodafone Uncovered a Bug</title>
      <link>https://miek.nl/2017/november/17/switching-to-vodafone-uncovered-a-bug/</link>
      <pubDate>Fri, 17 Nov 2017 20:55:08 +0000</pubDate>
      <guid>https://miek.nl/2017/november/17/switching-to-vodafone-uncovered-a-bug/</guid>
      <description>&lt;p&gt;Recently I&amp;rsquo;ve switched to Vodafone for all my cellular needs, in a twisted turn of events this&#xA;uncovered a goroutine leak in &lt;a href=&#34;https://github.com/miekg/dns&#34;&gt;miekg/dns&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;First some background on the setup I have at home (where this first showed up). I have your&#xA;run-of-the-mill LAN + Wifi and a Raspberry Pi running &lt;a href=&#34;https://coredns.io&#34;&gt;CoreDNS&lt;/a&gt; for my DNS&#xA;(proxy) needs. This &lt;a href=&#34;https://coredns.io&#34;&gt;CoreDNS&lt;/a&gt; instance forwards all DNS traffic to&#xA;&lt;a href=&#34;https://dns.google.com&#34;&gt;https://dns.google.com&lt;/a&gt; which uses a non-standard DNS protocol implemented as JSON over HTTPS.&#xA;I use this so that my DNS traffic is encrypted. Note that CoreDNS makes heavy use of&#xA;&lt;a href=&#34;https://github.com/miekg/dns&#34;&gt;miekg/dns&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>CoreDNS.io</title>
      <link>https://miek.nl/2016/august/07/coredns.io/</link>
      <pubDate>Sun, 07 Aug 2016 09:58:01 -0700</pubDate>
      <guid>https://miek.nl/2016/august/07/coredns.io/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve created an official home for CoreDNS: &lt;a href=&#34;https://coredns.io&#34;&gt;https://coredns.io&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Still working on filling in the blanks and touching up on the &amp;ldquo;design&amp;rdquo;, but so far, so good.&#xA;It features a bit of a startup vibe, and as with design of&#xA;&lt;a href=&#34;https://miek.nl/2016/february/20/hugo/&#34;&gt;miek.nl&lt;/a&gt; we&amp;rsquo;ll see how it goes.&lt;/p&gt;&#xA;&lt;p&gt;Most content will be linked from &lt;a href=&#34;https://github.com/miekg/coredns&#34;&gt;Github&lt;/a&gt;,&#xA;and the Wiki that will eventually show up there.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve also created a twitter account for &lt;a href=&#34;https://twitter.com/corednsio&#34;&gt;@corednsio&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Starting with CoreDNS</title>
      <link>https://miek.nl/2016/april/27/starting-with-coredns/</link>
      <pubDate>Wed, 27 Apr 2016 07:30:39 +0100</pubDate>
      <guid>https://miek.nl/2016/april/27/starting-with-coredns/</guid>
      <description>&lt;p&gt;This post talks you through getting and setting up &lt;a href=&#34;https://github.com/miekg/coredns&#34;&gt;CoreDNS&lt;/a&gt;&#xA;with a small zone file that it will serve. CoreDNS is a nameserver that is very flexible because it can&#xA;chain different kinds of middleware. From the README:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;CoreDNS aims to be a fast and flexible DNS server. The keyword here is &lt;em&gt;flexible&lt;/em&gt;, with CoreDNS you&#xA;are able to do what you want with your DNS data. And if not: write a middleware!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Caching in CoreDNS</title>
      <link>https://miek.nl/2016/april/20/caching-in-coredns/</link>
      <pubDate>Wed, 20 Apr 2016 07:54:08 +0100</pubDate>
      <guid>https://miek.nl/2016/april/20/caching-in-coredns/</guid>
      <description>&lt;p&gt;In the last couple of evenings I&amp;rsquo;ve implemented a &lt;a href=&#34;https://github.com/miekg/coredns/blob/master/middleware/cache/README.md&#34;&gt;caching&#xA;middleware&lt;/a&gt; in CoreDNS. It&#xA;has a only a few knobs and should be simple to use.&lt;/p&gt;&#xA;&lt;p&gt;Take a simple Corefile and add caching, via the &lt;code&gt;cache&lt;/code&gt; directive.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-txt&#34; data-lang=&#34;txt&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.:1053 {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    proxy . 8.8.4.4:53&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    cache 10 miek.nl&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    log stdout&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    errors stdout&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Which defines CoreDNS to be a proxy, and &lt;em&gt;only&lt;/em&gt; cache responses for the &lt;code&gt;miek.nl&lt;/code&gt; zone. This&#xA;cache only caches for up to 10 seconds. Lets send some queries and looks at the logs:&lt;/p&gt;</description>
    </item>
    <item>
      <title>CoreDNS Dogfood, part 2</title>
      <link>https://miek.nl/2016/april/15/coredns-dogfood-part-2/</link>
      <pubDate>Fri, 15 Apr 2016 22:28:17 +0100</pubDate>
      <guid>https://miek.nl/2016/april/15/coredns-dogfood-part-2/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/miekg/coredns&#34;&gt;CoreDNS&lt;/a&gt; is running as my DNS server for &lt;a href=&#34;https://miek.nl/2016/april/08/coredns-dogfood/&#34;&gt;at least&#xA;a week&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;That post was a bit light on the details, so find the complete Corefile that I&amp;rsquo;m using&#xA;attached to this post below.&lt;/p&gt;&#xA;&lt;p&gt;EDNS is now fixed and zones are reloaded when they changed on disk, i.e. DNSSEC signing with&#xA;a simple CRON job:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-txt&#34; data-lang=&#34;txt&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2016/04/15 22:42:41 [INFO] Successfully reloaded zone `miek.nl.&amp;#39;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2016/04/15 22:42:41 [INFO] Sent notify for zone miek.nl. to 37.97.149.87:53&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;185.49.141.42 - [15/Apr/2016:22:42:41 +0100] &amp;#34;SOA IN miek.nl. udp false 2048&amp;#34; NOERROR 94 181.859µs&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2016/04/15 22:42:41 [INFO] Sent notify for zone miek.nl. to 185.49.141.42:53&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2016/04/15 22:42:41 [INFO] Outgoing transfer of 42 records of zone miek.nl. to 37.97.149.87 started&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Monitoring works well and will be even further &lt;a href=&#34;https://github.com/miekg/coredns/issues/39&#34;&gt;extended in the&#xA;future&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>CoreDNS Dogfood</title>
      <link>https://miek.nl/2016/april/08/coredns-dogfood/</link>
      <pubDate>Fri, 08 Apr 2016 19:31:02 +0100</pubDate>
      <guid>https://miek.nl/2016/april/08/coredns-dogfood/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;Reading this means CoreDNS has done its job!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&amp;hellip;And CoreDNS is live:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;% dig @linode.atoom.net TXT CH version.bind +short&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;CoreDNS&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is quite nice, because it allows me test it properly with 3rd party tools, like&#xA;&lt;a href=&#34;https://zonemaster.se/&#34;&gt;zonemaster&lt;/a&gt;. That turned up one issue with&#xA;&lt;a href=&#34;https://github.com/miekg/coredns/issues/89&#34;&gt;EDNS&lt;/a&gt; which needs fixing. It would also&#xA;be nice to have an automatic &lt;a href=&#34;https://github.com/miekg/coredns/issues/93&#34;&gt;update and reloading of&#xA;zones&lt;/a&gt; (after a signal).&lt;/p&gt;&#xA;&lt;p&gt;The EDNS stuff will be fixed real soon (TM). The other stuff is less important. I will&#xA;now also focus on performance, testing and fixing issue with the current set of middleware.&#xA;(Although super awesome middleware is welcome!)&lt;/p&gt;</description>
    </item>
    <item>
      <title>CoreDNS: almost ready to dogfood</title>
      <link>https://miek.nl/2016/april/06/coredns-almost-ready-to-dogfood/</link>
      <pubDate>Wed, 06 Apr 2016 22:24:45 +0100</pubDate>
      <guid>https://miek.nl/2016/april/06/coredns-almost-ready-to-dogfood/</guid>
      <description>&lt;p&gt;I need to test AXFR and how it responds to notify, and yes this will get some proper&#xA;&lt;code&gt;*_test.go&lt;/code&gt; files in the near future, but for know I just need to know if it works&#xA;just this once (TM). For this I need to transfer a zone &lt;em&gt;and&lt;/em&gt; need to have a&#xA;proper primary setup so that I can send notifies that &lt;a href=&#34;https://github.com/miekg/coredns&#34;&gt;CoreDNS&lt;/a&gt;&#xA;will respond to.&lt;/p&gt;&#xA;&lt;p&gt;So I ended up with the following Corefile, where 176.58.119.54 is the real primary,&#xA;127.0.0.1 is a fake one which allows me to send notifies with &lt;code&gt;kdig&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Running CoreDNS</title>
      <link>https://miek.nl/2016/april/03/running-coredns/</link>
      <pubDate>Sun, 03 Apr 2016 09:44:34 +0100</pubDate>
      <guid>https://miek.nl/2016/april/03/running-coredns/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;CoreDNS is now running on &lt;code&gt;linode.atoom.net&lt;/code&gt; on port 1053 (yes not yet on 53..). It should&#xA;implement &lt;em&gt;most&lt;/em&gt; protocol features and allows for AXFR (to everyone) and is able to act as&#xA;a secondary. Not bad after ~2 weeks of programming. ;-)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Recipe for writing a DNS server in 2 weeks:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Study the DNS for 15+ years.&lt;/li&gt;&#xA;&lt;li&gt;Start an &lt;a href=&#34;https://github.com/miekg/dns&#34;&gt;easy to use DNS library&lt;/a&gt; 5 years ago.&lt;/li&gt;&#xA;&lt;li&gt;Write DNS server in &lt;a href=&#34;https://github.com/coredns/coredns&#34;&gt;~2 weeks&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The current version of CoreDNS works, but isn&amp;rsquo;t fully standards compliant (in a few corner cases,&#xA;mostly DNSSEC related). It is also optimistic about operational errors, i.e. it assumes everything&#xA;will work as expected.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Almost ready to dogfood CoreDNS</title>
      <link>https://miek.nl/2016/march/28/almost-ready-to-dogfood-coredns/</link>
      <pubDate>Mon, 28 Mar 2016 21:47:02 +0100</pubDate>
      <guid>https://miek.nl/2016/march/28/almost-ready-to-dogfood-coredns/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/miekg/coredns&#34;&gt;CoreDNS&lt;/a&gt; is gaining more and more features, and&#xA;bug &lt;a href=&#34;https://github.com/miekg/coredns/issues/15&#34;&gt;#15, allowing CoreDNS to replace BIND9 in my home&#xA;setup&lt;/a&gt;, is almost attainable. With a pre-signed&#xA;DNSSEC zone (I just use CRON, don&amp;rsquo;t do key rollovers) and the following Corefile, CoreDNS is acting&#xA;standards compliant already:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;.:1053 {&#xA;    errors stdout&#xA;    log stdout&#xA;    file miek.nl.signed miek.nl {&#xA;        transfer out&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Start it, query it:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-txt&#34; data-lang=&#34;txt&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;% dig @localhost -p 1053 SOA miek.nl +short&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;linode.atoom.net. miek.miek.nl. 1459138381 14400 3600 604800 14400&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;em&gt;And!&lt;/em&gt; DNSSEC:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Writing CoreDNS Middleware</title>
      <link>https://miek.nl/2016/march/25/writing-coredns-middleware/</link>
      <pubDate>Fri, 25 Mar 2016 08:37:02 +0000</pubDate>
      <guid>https://miek.nl/2016/march/25/writing-coredns-middleware/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;If it is not for me, give it to the next one.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Writing CoreDNS middleware consists out of four parts:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The actual middleware; the &lt;code&gt;ServeDNS&lt;/code&gt; method that gets the request.&lt;/li&gt;&#xA;&lt;li&gt;The setup part, the gets the Corefile configuration and creates the middleware.&lt;/li&gt;&#xA;&lt;li&gt;Documentation.&lt;/li&gt;&#xA;&lt;li&gt;Registration.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Note that part 1 and 2 also need tests!&lt;/p&gt;&#xA;&lt;h2 id=&#34;middleware&#34;&gt;Middleware&lt;/h2&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s take a look at the chaos middleware that returns author and version information&#xA;in the CH class. The main entry point for the whole thing is the &lt;code&gt;Chaos&lt;/code&gt; structure. That structure&#xA;holds some information and most importantly the &lt;code&gt;Next&lt;/code&gt; middleware.Handler for chaining it to the&#xA;next middleware:&lt;/p&gt;</description>
    </item>
    <item>
      <title>SkyDNS in CoreDNS</title>
      <link>https://miek.nl/2016/march/24/skydns-in-coredns/</link>
      <pubDate>Thu, 24 Mar 2016 18:31:18 +0000</pubDate>
      <guid>https://miek.nl/2016/march/24/skydns-in-coredns/</guid>
      <description>&lt;p&gt;The &lt;a href=&#34;https://github.com/miekg/coredns/tree/master/middleware/etcd&#34;&gt;etcd middleware&lt;/a&gt; is shaping&#xA;up nicely. With the following &lt;code&gt;Corefile&lt;/code&gt; you already have a big chunk of the SkyDNS funcionality:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;.:1053 {&#xA;    errors&#xA;    etcd skydns.local&#xA;    proxy . 8.8.8.8:53&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Which says, run on port 1053, accept queries for &lt;em&gt;all&lt;/em&gt; zones, if the zone matches &lt;code&gt;skydns.local.&lt;/code&gt; go look&#xA;in etcd, if it doesn&amp;rsquo;t forward to GOOG. Multiple zones should work as well, but this is not tested&#xA;as of yet.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s test this &lt;a href=&#34;https://github.com/skynetservices/skydns/blob/master/README.md&#34;&gt;with the examples from SkyDNS&#39;&#xA;README&lt;/a&gt;. Let&amp;rsquo;s add all the &lt;code&gt;rails&lt;/code&gt;&#xA;production sites. (Why does this use rails btw?)&lt;/p&gt;</description>
    </item>
    <item>
      <title>CoreDNS Chaining Middleware</title>
      <link>https://miek.nl/2016/march/19/coredns-chaining-middleware/</link>
      <pubDate>Sat, 19 Mar 2016 20:59:53 +0000</pubDate>
      <guid>https://miek.nl/2016/march/19/coredns-chaining-middleware/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/miekg/coredns&#34;&gt;CoreDNS&lt;/a&gt; is shaping up nicely and of course&#xA;the middleware (taken from &lt;a href=&#34;https://caddyserver.com/&#34;&gt;Caddy&lt;/a&gt;) is working great.&lt;/p&gt;&#xA;&lt;p&gt;Take for instance the following. We want to rewrite ANY queries to HINFO (because&#xA;&lt;a href=&#34;https://tools.ietf.org/html/draft-dnsop-refuse-any-00&#34;&gt;DDoS&lt;/a&gt;) and &lt;em&gt;then&lt;/em&gt; proxy them&#xA;to Google. We also need some logging. So after downloading and compiling CoreDNS, create&#xA;the following &lt;code&gt;Corefile&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-txt&#34; data-lang=&#34;txt&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.:1053 {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    log stdout&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    rewrite ANY HINFO&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    proxy . 8.8.8.8:53&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;By default CoreDNS will read a file called &lt;code&gt;Corefile&lt;/code&gt;, so we can just start it with:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Announcing CoreDNS</title>
      <link>https://miek.nl/2016/march/18/announcing-coredns/</link>
      <pubDate>Fri, 18 Mar 2016 20:50:21 +0000</pubDate>
      <guid>https://miek.nl/2016/march/18/announcing-coredns/</guid>
      <description>&lt;p&gt;After some soul searching and help on twitter, I settled on &amp;ldquo;CoreDNS&amp;rdquo; as&#xA;a name &lt;a href=&#34;https://miek.nl/2016/march/14/first-light/&#34;&gt;for my Caddy fork&lt;/a&gt;.&#xA;CoreDNS, as it is just a shell to run middleware.&lt;/p&gt;&#xA;&lt;p&gt;The code is up on &lt;a href=&#34;https://github.com/miekg/coredns&#34;&gt;Github.com&lt;/a&gt;. A little warning: The zone&#xA;implementation is poor, the current middleware is lightly tested, etc., etc. The one thing it does&#xA;well is chaining the middleware, currently implemented:&lt;/p&gt;&#xA;&lt;dl&gt;&#xA;&lt;dt&gt;errors:&lt;/dt&gt;&#xA;&lt;dd&gt;log errors, not tested, it compiles, no idea if it actually works.&lt;/dd&gt;&#xA;&lt;dt&gt;log:&lt;/dt&gt;&#xA;&lt;dd&gt;same story as &lt;code&gt;errors.&lt;/code&gt;&lt;/dd&gt;&#xA;&lt;dt&gt;proxy:&lt;/dt&gt;&#xA;&lt;dd&gt;proxy request to a remote server, works, although flaky (prolly).&lt;/dd&gt;&#xA;&lt;dt&gt;prometheus:&lt;/dt&gt;&#xA;&lt;dd&gt;metrics; works. Not tested (i.e. full scraping with Prometheus).&lt;/dd&gt;&#xA;&lt;dt&gt;reflect:&lt;/dt&gt;&#xA;&lt;dd&gt;reflection service whenever you query for &lt;code&gt;who.&amp;lt;domain&amp;gt;&lt;/code&gt;. Mainly used&#xA;for testing.&lt;/dd&gt;&#xA;&lt;dt&gt;rewrite:&lt;/dt&gt;&#xA;&lt;dd&gt;can rewrite types in the request. Lightly tested.&lt;/dd&gt;&#xA;&lt;dt&gt;file:&lt;/dt&gt;&#xA;&lt;dd&gt;horrendous implementation that sort of works (some of the time).&lt;/dd&gt;&#xA;&lt;dt&gt;etcd:&lt;/dt&gt;&#xA;&lt;dd&gt;etcd backend (ala &lt;a href=&#34;https://github.com/skynetservices/skydns/&#34;&gt;SkyDNS&lt;/a&gt;): not implemented.&lt;/dd&gt;&#xA;&lt;/dl&gt;&#xA;&lt;p&gt;Also the tests don&amp;rsquo;t compile :) This seems like a large list, but it is mostly fixing&#xA;the details (a proper zone implementation will take some time though). In other words:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Caddy DNS update</title>
      <link>https://miek.nl/2016/march/17/caddy-dns-update/</link>
      <pubDate>Thu, 17 Mar 2016 22:13:29 +0000</pubDate>
      <guid>https://miek.nl/2016/march/17/caddy-dns-update/</guid>
      <description>&lt;p&gt;More &lt;a href=&#34;https://miek.nl/2016/march/14/first-light/&#34;&gt;light&lt;/a&gt;!&lt;/p&gt;&#xA;&lt;p&gt;My &amp;ldquo;Port Caddy to be a DNS server&amp;rdquo;-project is alive and kicking. Code will be published soon-ish,&#xA;mostly waiting for actually naming the bloody thing. Code is also littered with TODOs.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve implemented the following middlewares, the all need tests and actual use, but here we go:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;log&lt;/code&gt;, for logging (as in Caddy)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;error&lt;/code&gt;, for error logging (as in Caddy). These both include the &lt;code&gt;{{placeholder}}&lt;/code&gt; syntax, so you&#xA;can use &lt;code&gt;{{port}}&lt;/code&gt; and even &lt;code&gt;{&amp;gt;}&lt;/code&gt; for logging header bits.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;file&lt;/code&gt;, really, really stupid zone file backed zone implementation, more a proof of concept&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;reflect&lt;/code&gt;, reflect (test) middleware&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;proxy&lt;/code&gt;, proxy requests to an upstream nameserver/resolver&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I also want to add a &lt;code&gt;rewrite&lt;/code&gt; middleware that will, for instance, rewrite ANY queries to HINFO&#xA;ones.&lt;/p&gt;</description>
    </item>
    <item>
      <title>First Light</title>
      <link>https://miek.nl/2016/march/14/first-light/</link>
      <pubDate>Mon, 14 Mar 2016 21:31:01 +0000</pubDate>
      <guid>https://miek.nl/2016/march/14/first-light/</guid>
      <description>&lt;p&gt;So I &lt;a href=&#34;https://miek.nl/2016/march/10/caddy-dns/&#34;&gt;did fork Caddy&lt;/a&gt;, and converted it into&#xA;something that almost resembles a DNS server.&lt;/p&gt;&#xA;&lt;p&gt;This is Caddy DNS (need an name!) without any configuration, i.e. an empty Caddyfile.&#xA;It will then fallback and be a reflection server (couldn&amp;rsquo;t think of something better&amp;hellip;). It will&#xA;respond to queries that ask for &lt;code&gt;who.&amp;lt;name&amp;gt;&lt;/code&gt; and will respond with your IP, port and transport.&lt;/p&gt;&#xA;&lt;p&gt;So the &lt;a href=&#34;https://en.wikipedia.org/wiki/First_light_%28astronomy%29&#34;&gt;first light&lt;/a&gt; query and answer would&#xA;be:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-txt&#34; data-lang=&#34;txt&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dig @localhost -p 1053 A who.miek.nl&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;;; -&amp;gt;&amp;gt;HEADER&amp;lt;&amp;lt;- opcode: QUERY, status: NOERROR, id: 62561&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;;; QUESTION SECTION:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;;who.miek.nl.&#x9;&#x9;&#x9;IN&#x9;A&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;;; ANSWER SECTION:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;who.miek.nl.&#x9;&#x9;0&#x9;IN&#x9;AAAA&#x9;::1&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;;; ADDITIONAL SECTION:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;who.miek.nl.&#x9;&#x9;0&#x9;IN&#x9;TXT&#x9;&amp;#34;Port: 1234 (udp)&amp;#34;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And slightly later with the port number properly fixed:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Caddy DNS</title>
      <link>https://miek.nl/2016/march/10/caddy-dns/</link>
      <pubDate>Thu, 10 Mar 2016 21:41:08 +0000</pubDate>
      <guid>https://miek.nl/2016/march/10/caddy-dns/</guid>
      <description>&lt;p&gt;Lately I&amp;rsquo;m thinking to use &lt;a href=&#34;https://github.com/miekg/dns&#34;&gt;Go DNS&lt;/a&gt; to create a DNS server that is&#xA;completely modelled after &lt;a href=&#34;https://caddyserver.com&#34;&gt;Caddy&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;There is no code and no name, nothing. Just an idea.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;So this magical new DNS server would be billed similar to Caddy, which has the tag line &amp;ldquo;Serve The&#xA;Web Like It&amp;rsquo;s 2016&amp;rdquo;. Caddy for instance will &lt;em&gt;automatically&lt;/em&gt; fetch certs from &lt;a href=&#34;https://letsencrypt.org/&#34;&gt;Let&amp;rsquo;s&#xA;Encrypt&lt;/a&gt; and configure HTTP/2 and HTTPS. In the case of a DNS server that&#xA;would translate to good core functionally, support for DNSSEC and key rotation, ala &lt;a href=&#34;https://www.knot-dns.cz/&#34;&gt;Knot&#xA;DNS&lt;/a&gt;. Also note that now that DNS over TLS is&#xA;a &lt;a href=&#34;https://datatracker.ietf.org/doc/draft-ietf-dprive-dns-over-tls/&#34;&gt;thing&lt;/a&gt; one could even image&#xA;this server &lt;em&gt;doing the exact same thing as Caddy&lt;/em&gt; and automatically getting certs from Let&amp;rsquo;s&#xA;Encrypt. Same thing for the above mentioned DNSSEC key maintenance, &lt;code&gt;&amp;lt;unamed server&amp;gt;&lt;/code&gt; will take care&#xA;of it. (This is a non-trivial amount of work, I might add)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Monitoring with SSH and Prometheus</title>
      <link>https://miek.nl/2016/february/24/monitoring-with-ssh-and-prometheus/</link>
      <pubDate>Wed, 24 Feb 2016 11:35:01 +0000</pubDate>
      <guid>https://miek.nl/2016/february/24/monitoring-with-ssh-and-prometheus/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;I just wanted to see some qps metrics from BIND9.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is a bit of hand wavey post on how to set up remote monitoring with&#xA;&lt;a href=&#34;https://prometheus.io&#34;&gt;Prometheus&lt;/a&gt;, &lt;a href=&#34;http://grafana.org&#34;&gt;Grafana&lt;/a&gt; and SSH tunnels.&lt;/p&gt;&#xA;&lt;p&gt;Initially I &lt;em&gt;just&lt;/em&gt; wanted to monitor BIND9 because it actually exports some reasonable&#xA;&lt;a href=&#34;https://kb.isc.org/article/AA-01123&#34;&gt;metrics&lt;/a&gt;, that can be made usable with&#xA;&lt;a href=&#34;https://github.com/digitalocean/bind_exporter&#34;&gt;bind_exporter&lt;/a&gt;. But of course BIND is BIND so this&#xA;is different in &lt;a href=&#34;https://github.com/digitalocean/bind_exporter/issues/7&#34;&gt;BIND 9.10&lt;/a&gt; which is what&#xA;I have on my server&amp;hellip;. &lt;em&gt;sigh&lt;/em&gt;. &lt;a href=&#34;https://twitter.com/@jpmens&#34;&gt;@jpmens&lt;/a&gt; also has some&#xA;&lt;a href=&#34;http://jpmens.net/2010/10/21/using-binds-statistics-server-to-list-zones-and-axfr-the-list/&#34;&gt;interesting tidbits&lt;/a&gt;&#xA;about this BIND9 feature.&lt;/p&gt;</description>
    </item>
    <item>
      <title>IDN and Private RR in Go DNS</title>
      <link>https://miek.nl/2014/september/21/idn-and-private-rr-in-go-dns/</link>
      <pubDate>Sun, 21 Sep 2014 19:45:00 +0000</pubDate>
      <guid>https://miek.nl/2014/september/21/idn-and-private-rr-in-go-dns/</guid>
      <description>&lt;p&gt;Thanks to the excellent work from Alex Sergeyev, &lt;a href=&#34;http://github.com/miekg/dns&#34;&gt;Go DNS&lt;/a&gt;&#xA;has gotten some new features. I want to highlight two: IDN (&lt;a href=&#34;https://www.ietf.org/rfc/rfc3492.txt&#34;&gt;https://www.ietf.org/rfc/rfc3492.txt&lt;/a&gt;) and Private&#xA;RR support (&lt;a href=&#34;http://tools.ietf.org/html/rfc6895&#34;&gt;http://tools.ietf.org/html/rfc6895&lt;/a&gt;).&lt;/p&gt;&#xA;&lt;h2 id=&#34;idn&#34;&gt;IDN&lt;/h2&gt;&#xA;&lt;p&gt;This adds support for converting from and to Punycode. There is &lt;em&gt;no&lt;/em&gt; explicit support, you will&#xA;need to call &lt;code&gt;idn.ToPunycode&lt;/code&gt; and &lt;code&gt;idn.FromPunyCode&lt;/code&gt; yourself if you are dealing with IDNs.&lt;/p&gt;&#xA;&lt;p&gt;The examples give in the code:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;name := &amp;quot;インターネット.テスト&amp;quot;&#xA;fmt.Printf(&amp;quot;%s -&amp;gt; %s&amp;quot;, name, idn.ToPunycode(name))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Which outputs:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Go DNS package</title>
      <link>https://miek.nl/2014/august/16/go-dns-package/</link>
      <pubDate>Sat, 16 Aug 2014 09:33:00 +0000</pubDate>
      <guid>https://miek.nl/2014/august/16/go-dns-package/</guid>
      <description>&lt;p&gt;Go DNS is a package that implements a DNS interface in &lt;a href=&#34;http://golang.org&#34;&gt;Go&lt;/a&gt;.&#xA;This library &lt;strike&gt;takes a new, innovative and enterprise ready&#xA;approach&lt;/strike&gt; sends and receives queries to and from the DNS.&#xA;It is licensed under the same license as the official Go code, as&#xA;this is a fork of that code.&lt;/p&gt;&#xA;&lt;p&gt;The aim is to be powerful, simple and fast.&lt;/p&gt;&#xA;&lt;p&gt;Supported:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;All RR types;&lt;/li&gt;&#xA;&lt;li&gt;Synchronous and asynchronous queries and replies;&lt;/li&gt;&#xA;&lt;li&gt;DNSSEC: validation, signing, key generation, reading &lt;code&gt;.private&lt;/code&gt; key files&lt;/li&gt;&#xA;&lt;li&gt;(Fast) sending/receiving/printing packets, RRs;&lt;/li&gt;&#xA;&lt;li&gt;Full control over what is being send;&lt;/li&gt;&#xA;&lt;li&gt;Zone transfers, EDNS0, TSIG, NSID;&lt;/li&gt;&#xA;&lt;li&gt;Server side programming (a full blown nameserver).&lt;/li&gt;&#xA;&lt;li&gt;(Fast) reading zones/RRs from files/strings.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;code&#34;&gt;Code&lt;/h1&gt;&#xA;&lt;p&gt;The git repository is hosted on &lt;a href=&#34;http://github.com/miekg/dns&#34;&gt;github&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>SkyDNS running live</title>
      <link>https://miek.nl/2014/june/28/skydns-running-live/</link>
      <pubDate>Sat, 28 Jun 2014 09:02:00 +0000</pubDate>
      <guid>https://miek.nl/2014/june/28/skydns-running-live/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/skynetservices/skydns&#34;&gt;SkyDNS&lt;/a&gt; is able to do DNSSEC. It generates&#xA;signatures and NSEC3 records on the fly. For authenticated denial of existence SkyDNS&#xA;uses &lt;a href=&#34;http://tools.ietf.org/html/rfc7129#appendix-B&#34;&gt;NSEC3 white lies&lt;/a&gt;, of course implementing&#xA;(and testing!) this isn&amp;rsquo;t completely trivial.&lt;/p&gt;&#xA;&lt;p&gt;To aid in debugging I&amp;rsquo;ve setup a live version of SkyDNS on &lt;code&gt;voordeur.atoom.net&lt;/code&gt;, under the name the&#xA;zone &lt;a href=&#34;http://dnssex.nl&#34;&gt;http://dnssex.nl&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;% dig +mul +noall +answer @voordeur.atoom.net soa skydns.dnssex.nl&#xA;skydns.dnssex.nl.    3600 IN SOA ns1.dns.skydns.dnssex.nl. hostmaster.skydns.local. (&#xA;                            1403942400 ; serial&#xA;                            28800      ; refresh (8 hours)&#xA;                            7200       ; retry (2 hours)&#xA;                            604800     ; expire (1 week)&#xA;                            60         ; minimum (1 minute)&#xA;                            )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;To help getting DNSSEC support 100% working this zone has been delegated and has an DS record&#xA;in the parent zone. With &lt;code&gt;unbound-host&lt;/code&gt; you can see the validation status of this zone:&lt;/p&gt;</description>
    </item>
    <item>
      <title>SkyDNS version 2</title>
      <link>https://miek.nl/2014/june/08/skydns-version-2/</link>
      <pubDate>Sun, 08 Jun 2014 12:46:00 +0000</pubDate>
      <guid>https://miek.nl/2014/june/08/skydns-version-2/</guid>
      <description>&lt;p&gt;SkyDNS version 1 &lt;a href=&#34;http://blog.gopheracademy.com/skydns&#34;&gt;was announced some time ago&lt;/a&gt;, since then it&#xA;has seen some developments, which resulted in &lt;a href=&#34;https://github.com/skynetservices/skydns&#34;&gt;SkyDNS version 2&lt;/a&gt;. This new version uses &lt;a href=&#34;http://github.com/coreos/etcd&#34;&gt;Etcd&lt;/a&gt; as its backend. This blog post will walk you through the installation and shows how to use it.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what&#34;&gt;What?!&lt;/h2&gt;&#xA;&lt;p&gt;SkyDNS(2) is a service discovery tool that utilizes the DNS to find hosts in a distributed environment. But&#xA;using DNS means &amp;ldquo;legacy&amp;rdquo; clients can be used. Want to know if you MariaDB cluster is still up?&#xA;&lt;code&gt;ping mariadb.skydns.local&lt;/code&gt; can be used for that. By default SkyDNS will use &lt;code&gt;skydns.local.&lt;/code&gt; as the domain&#xA;to anchor all names.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Do&#39;s and dont&#39;s for (ab)using the DNS</title>
      <link>https://miek.nl/2013/october/12/dos-and-donts-for-abusing-the-dns/</link>
      <pubDate>Sat, 12 Oct 2013 11:31:00 +0000</pubDate>
      <guid>https://miek.nl/2013/october/12/dos-and-donts-for-abusing-the-dns/</guid>
      <description>&lt;p&gt;So you want to (ab)use the DNS for your usecase?&lt;/p&gt;&#xA;&lt;p&gt;Here are some do&amp;rsquo;s and dont&amp;rsquo;s.&#xA;For those inclined here is some background documentation on this subject:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://tools.ietf.org/html/rfc5507&#34;&gt;http://tools.ietf.org/html/rfc5507&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://tools.ietf.org/html/rfc6950&#34;&gt;http://tools.ietf.org/html/rfc6950&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://tools.ietf.org/html/rfc5395&#34;&gt;http://tools.ietf.org/html/rfc5395&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;do-not&#34;&gt;Do not&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Invent your own new TLDs. If you must, use something like &lt;code&gt;.local&lt;/code&gt;, or &lt;code&gt;.home&lt;/code&gt;, or&#xA;use a domain &lt;em&gt;that you actually own&lt;/em&gt;;&lt;/li&gt;&#xA;&lt;li&gt;Use the &lt;code&gt;TXT&lt;/code&gt; RR to cram it with your stuff (like the &lt;code&gt;SPF&lt;/code&gt; guys did);&lt;/li&gt;&#xA;&lt;li&gt;Store large data blobs in the DNS;&lt;/li&gt;&#xA;&lt;li&gt;Use a new DNS class.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;do&#34;&gt;Do&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Reuse existing RR types, there are some weird ones out there that might suite&#xA;your use case, like &lt;code&gt;NAPTR&lt;/code&gt;, or the well supported &lt;code&gt;SRV&lt;/code&gt; record.&lt;/li&gt;&#xA;&lt;li&gt;Register a new RR type if you think you&amp;rsquo;ll need one. Fill out the&#xA;&lt;a href=&#34;http://tools.ietf.org/html/rfc5395#appendix-A&#34;&gt;template&lt;/a&gt; detailing&#xA;the new RR.&lt;/li&gt;&#xA;&lt;li&gt;Store small data blobs in the DNS. Let them point to services where you can retrieve the&#xA;data you&amp;rsquo;ll need.&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
  </channel>
</rss>
