Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Could anybody provide a step-by-step procedure to set up DNSSEC under BIND 9.7? I think the version is relevant because it is supposed to make life easier. In fact, there is a document published by ISC called DNSSEC for Humans, which I used as a starting point, though it's not quite a tutorial.

The main reason I'm using 9.7 (say, instead of the brand new 9.9) is that it is the stable version under Debian 6. I should mention that I have a basic BIND configuration up and running.

What I tried:

  1. Included inside the appropriate curly brackets in /etc/bind/named.conf.options the line

    dnssec-enable yes;

    and restarted BIND.

  2. Ran dnssec-keygen

  3. Ran dnssec-keygen -fk

  4. Tried dnssec-signzone –S

However, the last step gives me the error

dnssec-signzone: fatal: No signing keys specified or found.

I can see this is a likely error, as there seem to be missing options indicating where my keys are, but on the hand the referred guide by ISC cites specifically this last example. Indeed, the flag -S stands in fact for "smart signing", so I was hoping having the keys in the same directory from where I execute the last command (/etc/bind) could suffice.

Since this is a toy, non-production project, I don't mind repeating these steps, say, every 30 days, but I'd like to keep them as simple as possible and... get them right!

Any ideas/pointers? Thanks in advance.

share|improve this question
up vote 6 down vote accepted

The simplest way to enable DNSSEC with BIND is automatic signing, below is a step-by-step tutorial:

Prerequisites: I will assume that your zone file is /var/lib/bind/ Zone file and the folder should be writable for bind process ! You may need to adjust permissions, and/or edit your /etc/apparmor.d/usr.sbin.named.

Step 1: Generate DNSSEC keys:

dnssec-keygen -K /var/lib/bind/

-K specifies output folder for the newly generated keys, the second parameter is the zone name. This command may take very long to complete because it will wait until enough entropy is available on your system. If all you want is to try the configuration, and you aren't generating keys for a production system, you may add -r /dev/urandom - it will quickly generate not-so-secure keys. Note also that if you run this command multiple times, each time it will generate a new set of keys, and all the sets will be used to sign your zone.

Step 2: Configure BIND to enable automatic signing for your zone:

zone {
    type master;
    file "/var/lib/bind/";        
    auto-dnssec maintain;
//Enable The Magic
    key-directory "/var/lib/bind/";
//Look for DNSSEC keys in "/etc/bind/" folder
    update-policy local;
//Enable dynamic updates (required for auto-dnssec)

auto-dnssec maintain tells bind to periodically search the folder, specified in key-directory, for new DNSSEC keys, add those keys to the zone and sign the zone. All automatically, without your interaction. Core DNSSEC support itself is already enabled by default. Your named.conf may well consist of this zone section alone.

Step 3: Reload bind

rndc reload Will load the new configuration and bind will load your DNSSEC keys and sign the zone.

Done. Confirm that it works with dig +dnssec @localhost DNSKEY. You should get DNSKEY and RRSIG records.

Secure Delegation

If you add a DNNSEC to a real domain, to fully enable DNNSEC validation, you need to add DS records to your parent zone - this is done same way as NS records - via your domain registrar.

To verify that it all works, you may use online tools like and


Some may ask: what about ZSKs and KSKs ? - This process will sign the whole zone with a single ZSK, there's no KSK here. What I tried to do is provide simplest possible "guide" which would result in a good working DNSSEC. I did not try to cover all the possible details. And there's no need for everbody to care about all the possible details. IMHO.

share|improve this answer
Note that today you may have DNSSEC for your domain without running your own nameserver - some DNS hostings already support DNSSEC, like Dyn, (Oh No!)GoDaddy, and my own – Sandman4 Jul 7 '12 at 22:35
Another note: since it's Bind 9.7.x it will not load DNSSEC look-aside validation (DLV) keys automatically - get most recent keys here: and add them to your bind configuration. – c2h5oh Jul 7 '12 at 23:16
This question is for authoritative server, not a resolver. Besides, I don't think DLV is of much use today. – Sandman4 Jul 7 '12 at 23:32
Thank you for such a thorough answer. I came across in the meantime with DNSSEC-Tools. It's a more manual (cron-able) process that mainly involves apt-get install dnssec-tools; zonesigner -genkeys -zone – sadpluto Jul 9 '12 at 16:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.