PKCS11 wrapper for Go

In my quest to write a DNS server in Go I found myself lacking an interface to PKCS#11, so I wrote one. PKCS#11 is the interface to HSMs (including SoftHSM), and even though the interface sucks, I think a DNS server should store its keys in an HSM, by default. So… here it is. I’m still putting in the finishing touches and some general polish, but it is already usable.
Read more →

Rfc2pandoc

Have an I-D laying around and sick of typing XML? You want to use Pandoc2rfc, but you don’t want to manually convert the XML (or the generated text) into Pandoc? Well, now finally you can do this automatically. I created a little stylesheet, that can be used to transform the XML to Pandoc. Note the transformation is not perfect, there are a few cases where you still have to edit the Pandoc, most notably:
Read more →

Pandoc2rfc update(s)

In this post you can find pointers to documentation and source code for the pandoc2rfc package. Pandoc2rfc source code: github.com/miekg/pandoc2rfc, if you are not using the shell script (pandoc2rfc), you should just copy transform.xsl and perform the conversions manually (see documentation pointers below) Packages: for both xml2rfc and pandoc2rfc can be found at launchpad, these can probably also be installed on Debian and definitely on older Ubuntu versions. Documentation: This draft is the canonical documentation.
Read more →

New Dutch Teletext Script

Last week, the Dutch public broadcaster (NOS) decided to “fix” their online teletext offering, there breaking [an old script I had laying around](/2008/july/15/teletext_nl_script/index.htm l). Their new web interface (displaying gifs) can be found here. After @bdekruijff discovered their newly, hidden text feed, I decided to adapt the old script to this new situation. Thanks to this page I was able to (partially) reconstruct the feed. Most escape sequences are working, I’m still fiddling with finding Unicode chars for the “Contiguous Graphics Set”.
Read more →

Pandoc2rfc and xml2rfc

Thanks to the help of Marc Petit-Huguenin I have been able to create (and upload) debian packages (install fine on Ubuntu) for Pandoc2rfc and xml2rfc. For Pandoc2rfc I choose to add a little shell script that calls pandoc and xml2rfc for you. So creating an I-D is as simple as: pandoc2rfc *.mkd # or a few other extensions The shell script depends on transform.xsl to be installed in /usr/lib/pandoc2rfc/, allthough this can be overridden with a flag.
Read more →

Go DNS API change WITH rewrite rules!

In the standard library the DNS types have been renamed from RR_MX to MX which I think is a good change. So I made the same change in Go DNS, but this time I’m providing gofmt -r rewrite rules. They all have the form: gofmt -r 'RR_A -> A' -w *.go And then for all the types, so it’s quite a list. Download the rewrite rules here and use it like $SHELL rewrite.
Read more →

Adding new RR types to GO DNS

Inspired by NLnet Labs and PowerDNS, I figured I couldn’t stay behind, so here is how to add new RRs to Go DNS. A small note before I delve into the details, I haven’t optimized Go DNS for adding new types, as this is a relative infrequent event. There are a few items that need to be added before Go DNS understands the new RR type. Adding the type itself (as a structure) and the four methods needed to implement the RR interface; Adding the type number and the text string belonging it; Parsing from text, i.
Read more →

Source Code Pro

Indeed a really nice font and fully open source. Using it now at 11pt. See: Announcement from Adobe Download link
Read more →

User management in fksd

If you do DNS for too long everything looks like 53. In this “trace” I’m showing the logging of fksd when I add a zone, try to list it as a non-existent user miekg (which fails), add the user miekg and list it again. User are identified by the key in the TSIG record, their password is the shared secret. The “config files” from nsupdate can be found in the github repo of fksd.
Read more →

Dynamic nameserver provisioning with dns pkts

I’m writing a nameserver called fksd (Funkensturm daemon), which is currently in a prototype stage (but the code is available at github). In this server I’m pursuing some interesting directions in nameserver development, such as the dynamic configuration as provided by BIND10. BIND10 uses http(s), but I think using DNS packets is more in line with a nameserver, so I opted for that route. With fksd you can use packets (which will be TSIG signed in the future tomorrow) to configure the server.
Read more →

Libunbound wrapper in Go

I’ve created a small wrapper for libunbound for use in Go. The code can be found at github. It depends on my Go DNS library which can be found here. Official announcement on the Unbound-users@ list. To give you a little taste of how it looks, I’ve (re)created tutorials 2 to 6 in Go. Tutorial 2 looks like this, for instance: package main // https://www.unbound.net/documentation/libunbound-tutorial-2.html import ( "dns" "fmt" "os" "unbound" ) func main() { u := unbound.
Read more →

Sync subversion to github.com

This is a post that details on how to sync a subversion repository to git repository on github.com, and how to keep it in sync. The following sites were instrumental in getting this to work: stackoverflow.com question on getting svn into git; ssh foo. There are a number of steps to take. From a bird’s eye view: Use git svn to clone the svn repo to a git repo; Create a github git repo; Add a remote origin in your local git to the remote github repo; Use some SSH foo to use a separate SSH key for pushing to github.
Read more →

Printing MX records with Go DNS

Now that the API seems to stabilize it is time to update these items. We want to create a little program that prints out the MX records of domains, like so: % mx miek.nl miek.nl. 86400 IN MX 10 elektron.atoom.net. Or % mx microsoft.com microsoft.com. 3600 IN MX 10 mail.messaging.microsoft.com. We are using my Go DNS package. First the normal header of a Go program, with a bunch of imports.
Read more →

draft-gieben-creating-rfcs-pandoc-00.txt

Maybe I’ll try to send it in as a individual submission. Source repository at github As txt download Pandoc2rfc code repository Network Working Group R. Gieben Internet-Draft SIDN Intended status: Informational April 2012 Expires: October 3, 2012 Creating Internet Drafts and RFCs using Pandoc draft-gieben-creating-rfcs-pandoc-00 Abstract This memo presents a technique for using Pandoc syntax as a source format for documents in the Internet-Drafts (I-Ds) and Request for Comments (RFC) series.
Read more →

Super-short guide to getting q (Part II)

The development of the language Go is going at a fast pace, hence an updated version of Super-short guide to gettinq q. Get the latest version (called weekly) of Go: Get Go: hg clone -u release https://go.googlecode.com/hg/ go Note the directory you have downloaded it to and set add its bin directory to your PATH: PATH=$PWD/go/bin. Update Go to the latest weekly: cd go; hg pull; hg update weekly Compile Go: cd src, you should now sit in go/src.
Read more →

godns is now dns

Due to the new go tool (long story), I’ve renamed godns to dns. This means the github repo is also somewhere else. godns installed itself as dns so code using it does not need to be changed.
Read more →

DNS Fingerprinting

Announcing FP The tool for DNS fingerprinting is fpdns, which is Perl based. In recent times development seems to have picked up, but a little competition never hurt anyone, so I wrote fp in Go. Fp is also a fingerprint program for DNS servers. Its aim is to be more readable then fpdns is (was?). And make it more easy to add new server types. Help needed! Do you have some old(er) nameserver laying around that can be queried?
Read more →

Super-short guide to getting q

Get the latest version (called weekly) of Go: Get Go: hg clone -u release https://go.googlecode.com/hg/ go Note the directory you have downloaded it to and set $GOROOT to it: export GOROOT=$PWD/go. Add the GOROOT bin directory to your path: PATH=$PATH:$GOROOT/bin Update Go to the latest weekly: cd $GOROOT; hg pull; hg update weekly Compile Go: cd $GOROOT/src ; ./all.bash Install missing commands (gcc, sed, bison, etc.) if needed. The latest Go is now installed.
Read more →

XSLT and sectN/section

This came up during a recent Pandoc discussion. The discussion was about outputting <sectN> section styling when creating DocBook XML. Currently Pandoc outputs nested <section>s. I argued you could easily change between the two formats and <section> is more flexible, so just leave Pandoc as it is. But it allowed me to play with XSLT once more. With the following results. Translate to sectN This XSLT translates <section> to <sectN> where N is 5.
Read more →

Pandoc to RFC

This is an follow-up on this pandoc item in Dutch. When writing RFC 4641 we directly wrote the XML. Needless to say is was kinda tedious even thought the XML of xml2rfc is very “light”. Nowadays I’m a fan of the markdown syntax and especially the syntax as supported (created?) by Pandoc. So for my next RFC (if ever!) I decided I wanted to use Pandoc. As xml2rfc uses XML I thought the easiest way would be to create docbook XML and transform that using XSLT.
Read more →

Learning Go for E-readers

Thanks to a patch from Thomas Kappler I can now offer two types of PDFs, one for A4 pages and one for E-readers, like the kindle. The E-reader variant is suffixed with -kindle: Learning Go for E-readers Learning Go A4 paper
Read more →

VIM setup

After several years I decided to use a different color scheme for VIM. Also I’m going for force myself to use VIM’s folding abilities and use make from within VIM. For good measure I also want to use Omni-completion when writing Go code: Btw, this screenshots also shows the solarized (dark) colorscheme. Coloring Google for solarized. In my .vimrc: let g:solarized_termcolors=256 colorscheme solarized Make from VIM Use :make inside the editor and jump through the errors with:
Read more →

Chaining proxies

Online signing is cool, but slow. Caching queries in a reverse proxy is nice, but useless for something like NSD. But what if you want to do online signing in a fast way? Enter: proxy chaining. I already showed FunkenSign (example code is quite old though) and yesterday FunkenShield. What if you combine the two? That gives the best of both worlds: Online signing; Caching; And it adheres to the true Unix philosophy: do one thing, and do one thing well.
Read more →