Setting up name server to manage .dk domain

So I have a .dk domain that I want to control and play with from bind, this is how I set it up.

In order to manage a .dk domain you need your nameservers to be approved by dk-hostmaster.dk, you can apply for it here (it's free)
You also need to have atleast two name servers
And we need to allow AXFR (Zone transfers) to hostcount.dk-hostmaster.dk

First though you need to setup your dns server.
I started a debian VPS at linode (I wanted to get going quickly)

aptitude install bind9

okay so the default in bind9 is to allow AXFR globally, I don't like that and only want to give hostcount.dk-hostmaster.dk access, so I need to find the ip's for that.

$ host hostcount.dk-hostmaster.dk
hostcount.dk-hostmaster.dk has address 193.163.102.6
hostcount.dk-hostmaster.dk has IPv6 address 2a01:630::40:3:4:5:6

Creating an accesslist in /etc/bind/named.conf.options before the "options {" part

// hostcount.dk-hostmaster.dk
acl dk-hostmaster {
	193.163.102.6;2a01:630::40:3:4:5:6;
};

Also I don't want to give away binds version number so this is also added to named.conf.options

version "Bind version 9.something.somethingelse.idontremember.5";

next I want to add a zone in /etc/bind/named.conf.local

zone "pexio.dk" {
	type master;
	file "/var/lib/bind/pexio.dk";
	allow-transfer {"dk-hostmaster";};
};

and now to the exciting part, we need to create the zone file /var/lib/bind/pexio.dk
here's how mine currently look

$TTL 300                ; 5 min TTL for zone
$ORIGIN pexio.dk.
@               IN      SOA     ns1.pexio.net.  hostmaster.pexio.net. (
						2014020901      ; serial number
						43200           ; 12h refresh
						900             ; 15m retry
						1209600         ; 14d expiry
						300             ; 5m nx cache
						)

@               IN      NS      ns1.pexio.net.
@               IN      A       127.0.0.1
localhost       IN      A       127.0.0.1
test            IN      A       127.0.0.2

reload bind and lets test it out with dig from my laptop

$ dig @ns1.pexio.net A test.pexio.dk +short
127.0.0.2

And that's it.
Or as Duke Nukem would have said: "Piece of Cake"

Now i just need to setup a second slave name server, but that will be in a future post.