Workshop | 0. Access | 1. Resolver | 2. Authoritative | 3. Yet Another Zone | 4. Resiliency | 5. Validation | 6. Signing | 7. SoftHSM | 8. OpenDNSSEC | 9. DNS privacy


Editing the OpenDNSSEC Configuration

The configuration needs to be adjusted to better fit this setup.

  1. Open the configuration for editing:


    The repository list was adjusted in a previous lab.

  2. We will be rolling keys in a rapid pace, burning up a lot of keys in a year. The default setting is to pre-generate keys for a year, which will take a long time with so many keys. So we want to decrease this by modifying the setting AutomaticKeyGenerationPeriod to:

  3. There is only one core on the lab machine and the performance was not increased by using multiple threads. For this lab, will then only use one thread for the Signer in OpenDNSSEC.

  4. Save the file and exit.

  5. Setup the KASP database:


    And answer yes.

Creating a Policy

We will use the provided KASP policy “lab”. It uses very low values on the timing parameters, just so that key rollovers will go faster in this lab environment.

  1. Open the kasp.xml file:

  2. The policy we’re going to use is called “lab”, it is already defined beginning at the following statement:

     <Policy name="lab">
  3. Signatures are set to have a short lifetime:

  4. The TTL and safety margins for the keys are also lower:

  5. Set the KSK lifetime to 2 hours and the ZSK to 1 hours. Let’s change the algorithms of both the KSK and ZSK to ECDSAP256SHA256 (algorithm 13):

       <Algorithm length="256">13</Algorithm>
       <Algorithm length="256">13</Algorithm>
  6. The values for the SOA can be found in the zone we created earlier. We will use unixtime as the serial counter, like we did when signing using ldns.

  7. And these values are from the parent zone:

  8. Save and exit.

  9. Verify that the KASP looks ok. The database has not been created yet, you will thus get a warning about this.


    OpenDNSSEC will warn you that when you use Y (for Year) in duration fields, it is interpreted as 365 days.

Start OpenDNSSEC

  1. At this point we should start the OpenDNSSEC daemons. Both enforcer and signer daemons are started using:

    ods-control start
  2. Be sure to monitor the system log for any error conditions, some problems can only be reported once the daemons are already in the background.

    tail /var/log/syslog
  3. Import the initial KASP in OpenDNSSEC:

    ods-enforcer policy import

Add and sign the Zone

Zones can be added in two ways, either by command line or by editing the zonelist.xml. The command line is the one for now. We will create a new zonfile for this exercise.

  1. Create a zonefile called ods-<name>. The domain name for this zone will be ods-<name> It might be easiest to copy your first (unsigned!) zone and adapt values.

  2. Add the zone to the enforcer which will in turn inform the zone to be signed:

    ods-enforcer zone add --zone ods-<name> --policy lab \
                --input /etc/nsd/ods-<name> \
                --output /etc/nsd/ods-<name>.signed
  3. Check the syslog to see that the two daemons started, that the signconf was generated, and that Signer engine signed the zone:

    tail -n 100 /var/log/syslog
  4. Have a look on the signconf:

  5. Have a look on the signed zone file:

  6. Add the newly created signed zone to the NSD configuration:

          name: "ods-<name>"
          zonefile: /etc/nsd/ods-<name>.signed

Instruct NSD to reload the nsd.conf configuration:

    nsd-control reconfig

Publishing the DS RR

The zone is now signed and we have verified that DNSSEC is working. It is then time to publish the DS RR.

  1. Wait until the KSK is ready to be published in the parent zone:

    ods-enforcer key list -v
  2. Show the DS RRs that we are about to publish. Notice that they share the key tag with the KSK:

    ods-enforcer key export --zone ods-<name> --ds
  3. Add the DS records to your unsigned zone (ods-<name>) and replace the DS type with CDS, like you did before when signing with ldns.

    Now resign our zone and instuct NSD to load the latest version:

    ods-signer sign ods-<name>
    nsd-control reload
  4. Wait until the DS has been updated. Check the DS with the following command:

    dig ods-<name> DS
  5. It is now safe to tell the Enforcer that it has been seen. Replace KEYTAG with the keytag of your current KSK.

    ods-enforcer key ds-seen --zone ods-<name> --keytag KEYTAG
  6. The KSK is now considered as active. Check the key list with the following command:

    ods-enforcer key list
  7. Verify that we can query the zone from your Unbound resolver. The AD-flag should be set:

     dig +dnssec ods-<name> @res-<team>

KSK Rollover

The KSK rollover is usually done at the end of its lifetime. But a key rollover can be forced before that by issuing the rollover command.

  1. Check how much time is left before the KSK should be rolled:

    ods-enforcer key list
  2. We will now force a key rollover. If a key rollover has been initiated then this command will be ignored:

    ods-enforcer key rollover --zone ods-<name> --keytype KSK
  3. Wait until the new KSK is ready. It should be maximum 10 minutes. If it is longer than that, then you probably missed to adjust a value in your KASP. Update the KASP to match the LAB policy given here in the document.

    ods-enforcer key list -v
  4. The DS RRs can be exported to the parent once the new KSK is ready.

    Get the new DS record using:

    ods-enforcer key export --ds --zone ods-<name>

    Add the DS record to your unsigned zone, change the RR type to CDS. Remove the old CDS resource record! After that you have to resign your zone and reload NSD, like you did before.

  5. Wait until the DS has been updated.

    dig ods-<name> DS
  6. It is now safe to tell the Enforcer that it has been seen:

     ods-enforcer key ds-seen --zone ods-<name> --keytag KEYTAG
  7. The new KSK is now considered as active.

     ods-enforcer key list
  8. Reload the zone contents in NSD to have the newly signed zone.

     nsd-control reload
  9. Verify that we can query the zone from the resolver machine.

     dig +dnssec ods-<name> @res-<team>