JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for DNSSEC-DISCUSS Archives


DNSSEC-DISCUSS Archives

DNSSEC-DISCUSS Archives


DNSSEC-DISCUSS@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

DNSSEC-DISCUSS Home

DNSSEC-DISCUSS Home

DNSSEC-DISCUSS  April 2010

DNSSEC-DISCUSS April 2010

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Bind 9.7 "DNSSEC for humans"

From:

Phil Mayers <[log in to unmask]>

Reply-To:

Phil Mayers <[log in to unmask]>

Date:

Mon, 26 Apr 2010 18:24:46 +0100

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (149 lines)

All,

In case anyone is interested, the bind 9.7 releases have made some 
improvements to the workings of DNSSEC zones which greatly improve the 
experience, but it's sadly not that well documented.

I thought I'd write up a brief summary of what I've found. This is 
limited to the mastering & signing of DNSSEC zones; there are also 
enhancements for managing DLV and other keys, but they're pretty simple.


== Signature management ==

The important option is "auto-dnssec maintain" on a zone. In my testing 
I used:

zone "test.local" IN {
         type master;
         file "data/zones/test.local/zone";
         auto-dnssec maintain;
         key-directory "data/zones/test.local";
         allow-update { nsg; };
};

This puts the zone file & keys into one per-zone directory, and tells 
bind to read and honour key metadata for the keys found in that directory.

It looks like future plans include automatic generation of new ZSK and KSK



== Signing the zone initially ==

This is really very easy; simply generate a KSK and ZSK, put them into 
the zone key directory, and issue "rndc sign":

   cd /var/named/data/zones/test.local

   # alternatively, use the "-K keydir" option to the following:
   dnssec-keygen -r /dev/urandom -a RSASHA1 -b 1024 \
    -n ZONE -f KSK test.local
   dnssec-keygen -r /dev/urandom -a RSASHA1 -b 1024 \
    -n ZONE test.local

NOTE: at this and ALL OTHER points after manipulating the key files, you 
need to make sure they're readable by bind. By default, it sets the 
perms 0600 on the private key, and re-sets these every time you modify 
the key - irritating if you want them owned by root.named and perms 
0640, which seems rather more secure.

Then do:

   rndc sign test.local

...and that's it. Easy.

This seems to work pretty well with large zones. The zone is signed in 
pieces, and the SOA increments slowly(ish). You can do concurrent DDNS 
updates at the same time; they'll be signed as the process runs.

As far as I can make out, bind first goes through and builds the NSEC 
chain, then walks the NSEC chain and signs it and the related RRs.

Performance on a moderately recent desktop PC (dual-core 2.4GHz PC with 
slow-ish SATA disks) seems to be ~450 signatures/seconds, so make of 
that what you will for timings.

There may still be advantages to signing the zone initially with 
dnssec-signzone - specifically you can use the "-j" option to set the 
jitter of the signatures, and spread the subsequent re-signing out.


== Rolling over the ZSK ==

1. Generate a new ZSK in the key directory with a publication time of 
"now" but activation time "unset":

   dnssec-keygen -r /dev/urandom -a RSASHA1 -b 1024 \
    -P now -A none -n ZONE test.local

   rndc sign test.local

...the new DNSKEY should now be at the apex of the zone, but will not be 
used for signatures.

2. You should then wait sufficient time for the old DNSKEY RRset to 
expire from caches, before starting to use it for signing.

3. To start using it for signing, simply activate the new key and 
deactivate the old one:

   dnssec-settime -A now Ktest.local.+005+<newkeyid>
   dnssec-settime -I now Ktest.local.+005+<oldkeyid>

...future DDNS update into this zone will be signed by newkeyid and not 
oldkeyid. You then need to wait for bind to automatically re-sign the 
zone as the RRSIGs expire; this happens according to the 
"sig-validity-interval".

4. You can force bind to remove the old key and re-sign any records with 
that key at any time with:

   dnssec-settime -D now Ktest.local.+005+<oldkeyid>
   rndc sign test.local

...but obviously should not do that until step 2 (cache expiry) has 
occurred, else remote caching servers might have your old DNSKEY records 
and not be able to validate the new RRSIGs. It might be slow as well...

Be VERY VERY careful with this command. It *will* let you remove the ZSK 
from the zone, at which point it'll re-sign the zone with the KSK which 
is very much NOT what you want.

=== Rolling over the KSK ===

This is even easier:

1. Generate a new KSK:

   dnssec-keygen -r /dev/urandom -a RSASHA1 -b 1024 \
    -n ZONE -f KSK test.local

2. Ensure the permissions are ok and instruct named to read it:

   rndc sign test.local

3. Generate the DS or DLV records & send them to the relevant people:

   dnssec-dsfromkey Ktest.local.+005+<newkeyid>.key
   dnssec-dsfromkey -l dlv.isc.org Ktest.local.+005+<newkeyid>.key

4. Wait for the suitable amount of time

5. Remove the old KSK and re-sign

   dnssec-settime -D now Ktest.local.+005+<oldkeyid>
   rndc sign test.local

Again, be VERY VERY careful with this, it will let you remove the last 
KSK from the zone, and that would (I imagine) cause serious problems.


The major piece of magic seems to be the extra metadata stored in the 
bind private key files for creation, publish, activate, inactive and 
delete dates, and the ability of the bind online (re)signing process to 
honour them, and the dnssec-settime command to manipulate them.

All in all, it's a big improvement over the previous versions.

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

February 2024
January 2020
October 2018
May 2018
November 2017
October 2017
October 2016
September 2016
July 2016
June 2016
May 2016
May 2015
February 2015
January 2015
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
August 2012
July 2012
June 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager