DNS Sec Step by Step
DNS Sec Step by Step
Article
08/31/2016
In this article
1. In this guide
2. DNSSEC overview
3. DNS threats
4. How DNSSEC works
Show 39 more
Tip
The dnssecok option in the command above tells the DNS server the
client understands DNSSEC and the server can send these additional
records. Since the zone is not yet signed, no signature (RRSIG) records
are displayed in the response.
4. Leave the Windows PowerShell prompt open for the following
procedures.
To verify remote connections to dc1.sec.contoso.com
1. Type the following command and press ENTER:
Copy
mstsc /v:dc1.sec.contoso.com
2. Enter the password for the user1 account and click OK.
3. When you are prompted that there is a problem with security of
the remote computer, click Yes.
4. Verify that you are able to successfully connect to
dc1.sec.contoso.com, and then close the remote session.
Sign a zone on DC1 and distribute trust anchors
Next, sign the sec.contoso.com zone and distribute a trust anchor for
the zone. Trust anchor distribution is manual for DNS servers that are
not running on domain controllers, such as DNS1. Automatic trust
anchor distribution can be enabled for Active Directory-integrated
DNS servers such as DC2.
To sign a zone on DC1
1. In the DNS Manager console tree on DC1, navigate to Forward
Lookup Zones > sec.contoso.com.
2. Right-click sec.contoso.com, point to DNSSEC, and then
click Sign the Zone.
3. In the Zone Signing Wizard, click Next, and then choose Use
recommended settings to sign the zone.
4. Click Next twice, confirm that The zone has been successfully
signed is displayed, and then click Finish.
5. Refresh the DNS Manager console and verify that a new icon is
displayed for the sec.contoso.com zone, indicating that it is
currently signed with DNSSEC.
6. Click the sec.contoso.com zone and review the new resource
records that are present, including DNSKEY, RRSIG and NSEC3
records.
get-dnsclientnrptpolicy
9. Verify that computer and user policy updates were successful,
and that the value of DnsSecValidationRequired is True for
the .sec.contoso.com namespace.
10. Repeat the Group Policy update (gpupdate /force) and
verify NRPT policy on client1.
To query a signed zone with DNSSEC validation required
1. Start a Network Monitor capture if desired. Stop the capture
after issuing the following command, and then save the capture
using the name: Capture3.
2. On client1, at the Windows PowerShell prompt, type the
following command and then press ENTER:
Copy
resolve-dnsname dc1.sec.contoso.com –server dns1 –dnssecok
3. Confirm that the same results are returned as previously before
validation was required. Because a valid trust anchor is present
on DNS1, the query is successful even if validation is required.
Query DNSSEC records in the sec.contoso.com zone
Before unsigning and re-signing the zone, issue some queries for
DNSSEC records. These types of queries can be useful when
troubleshooting DNSSEC.
To query DNSSEC records in the sec.contoso.com zone
1. On client1, at the Windows PowerShell prompt, type the
following command and then press ENTER:
Copy
resolve-dnsname –name dc1.sec.contoso.com –type soa –server dns1
-dnssecok
2. On client1, at the Windows PowerShell prompt, type the
following command and then press ENTER:
Copy
resolve-dnsname –name sec.contoso.com –type dnskey –server dns1
-dnssecok
Tip
To see the syntax for resolve-dnsname, including all possible values
for the Type parameter, type get-help resolve-dnsname.
Unsign the zone and then re-sign the zone with custom parameters
DNSSEC signing will be removed from the sec.contoso.com zone and
then the zone will be re-signed using custom DNSSEC parameters.
To unsign the zone
1. On DC1, in the DNS Manager console tree, navigate to Forward
Lookup Zones > sec.contoso.com.
2. Right-click sec.contoso.com, point to DNSSEC, and then
click Unsign the Zone.
3. In the Unsign zone wizard, click Next.
4. Verify that The zone has been successfully unsigned is
displayed, and then click Finish.
5. Refresh the view in DNS Manager and verify that
the sec.contoso.com zone no longer contains DNSSEC signed
records, and the icon next to the zone indicates it is not
currently signed.
To re-sign the zone with custom parameters
1. On DC1, right-click sec.contoso.com, point to DNSSEC, and then
click Sign the Zone.
2. In the Zone Signing Wizard, click Next.
3. Customize zone signing parameters is chosen by default.
Click Next.
4. On the Key Master page, The DNS server DC1 is the Key
Master is chosen by default, because zone signing is being
performed on DC1.
If you have configured DC2 in this test lab, review options available
when Select another primary server as the Key Master is chosen. Do
not choose this option, but verify that dc2.contoso.com is also
available as a possible Key Master for this zone. When you are alerted
that all authoritative servers capable of DNSSEC online signing will be
loaded, click Yes.
5. Ensure that DC1 is chosen as the Key Master and then
click Next twice.
6. On the Key Signing Key (KSK), page, click the existing KSK (with
key length of 2048), and then click Remove.
7. To add a new KSK, click Add.
8. In the New Key Signing Key (KSK) dialog box, under Key
Properties, click the drop-down next to Cryptographic
algorithm and select RSA/SHA-512.
9. Under Key Properties, click the drop-down next to Key length
(Bits) and select 4096 and then click OK.
10. Click Next until You have successfully configured the
following parameters to sign the zone is displayed.
11. Review the parameters you have chosen and then
click Next to start the zone signing process.
12. Confirm that The zone has been successfully signed is
displayed, click Finish, and then refresh the view in DNS
Manager to verify the zone is signed again.
13. Refresh the view for the Trust Points folder and verify that
new DNSKEY trust points are present that use the RSA/SHA-512
algorithm.
14. At an Administrator Windows PowerShell prompt, type the
following commands and press ENTER:
Copy
Get-dnsservertrustanchor –name sec.contoso.com –computername
dns1
Get-dnsservertrustanchor –name sec.contoso.com –computername
dc1
Important
Automatic updating of trust anchors on a non-authoritative,
validating DNS server (per RFC 5011) only occurs during key rollover.
If you unsign and re-sign the zone manually with new keys, you must
also distribute a new trust anchor manually. If a validating DNS server
has an incorrect trust anchor, DNS queries that require validation will
indicate a server failure. When no trust anchor is present, queries will
also appear to fail validation. Since no trust anchor is present, the
server does not attempt to validate the response. In this scenario, an
unsecure packet error is displayed:
To demonstrate an unsecure response
1. On DNS1, at the Administrator Windows PowerShell prompt,
type the following command and then press ENTER twice:
Copy
remove-dnsservertrustanchor sec.contoso.com
2. Start a Network Monitor capture if desired. Stop the capture
after issuing the following command, and then save the capture
using the name: Capture5.
3. Type the following command and press ENTER:
Copy
resolve-dnsname –name dc1.sec.contoso.com –server dns1 -
dnssecok
mstsc /v:dc1.sec.contoso.com
2. Verify that Remote Desktop can’t find the computer
“dc1.sec.contoso.com” is displayed.
Demonstrate Active Directory replication of DNSSEC signed resource
records
When DNS servers are Active Directory-integrated, trust anchors and
signed resource records are updated automatically even if the zone is
unsigned and re-signed manually.
To demonstrate Active Directory replication of DNSSEC signed
resource records
1. On DC2, in DNS Manager, view the contents of the Trust
Points folder. Refresh the view if necessary to view the current
trust anchors.
2. Verify that the DNSKEY trust anchors for sec.contoso.com are
automatically updated to use the RSA/SHA-512 algorithm.
3. In the DNS Manager console tree, click Global Logs > DNS
Events and review event ID 7653 which states that the DNS
server has detected that zone signing parameters for the zone
sec.contoso.com have been changed and the zone will be re-
signed. No event is displayed after zone signing is completed.
4. Click Forward Lookup Zones > sec.contoso.com in the console
tree and verify that Secure Entry Point DNSKEY records are
present that use the RSA/SHA-512 algorithm.
5. On DC1, in DNS Manager, add a new host (A) record for
dns1.sec.contoso.com with an IP address of 10.0.0.2.
6. Refresh the view in DNS Manager and verify that an RR
Signature (RRSIG) record for dns1 is automatically created.
7. On DC2, refresh the view in DNS Manager and verify that the
new signed record has replicated to this server.
Tip
Adding or editing existing records in a zone does not trigger zone re-
signing. Only the new or updated resource records are signed with
the updated start of authority (SOA) record for the zone.
Transfer the Key Master role for sec.contoso.com to DC2
If might be necessary to transfer the Key Master role for a zone to
another DNS server. The role transfer can be performed from any
authoritative DNS server, and the current Key Master can be online or
offline. In the following example, the current Key Master is online.
To transfer the Key Master role for sec.contoso.com to DC2
1. On DC1 or DC2, in DNS Manager, right-click
the sec.contoso.com zone, point to DNSSEC, and then
click Properties.
2. On the Key Master tab, select Use the following DNS server as
the Key Master.
3. Click the drop-down list and when you are alerted that all
authoritative DNS servers will be loaded, click Yes.
4. Choose dc2.contoso.com from the list and then click OK.
5. When you are alerted that the Key Master setting will be
changed, click Yes.
6. Verify that Key Master for the zone sec.contoso.com is updated
successfully is displayed.
7. Verify that DNS event ID 7649 is displayed on the new Key
Master and DNS event ID 7648 is displayed on the previous Key
Master.
Appendix: Network Monitor results
The following sections provide information about the results of
Network Monitor (netmon) captures during the DNSSEC
demonstration portion of the test lab. Analysis of network traffic uses
the Network Conversations, Frame Summary, and Frame
Details views.
Packet capture results
In all test lab captures, two IPv4 network conversations are displayed.
The IPv4 network conversations include queries
for dns1.contoso.com and dc1.sec.contoso.com. Queries for
dc1.sec.contoso.com will also include A record queries
and AAAA record queries. For the purposes of the test lab, you can
ignore the IPv6 network conversation, and all queries for host records
for dns1.contoso.com and AAAA queries for dc1.sec.contoso.com.
The two IPv4 network conversations displayed are:
1. 10.0.0.4 – 10.0.0.2: A packet exchange between Client1
(10.0.0.4) and DNS1 (10.0.0.2). Locate the query for the host (A)
record for dc1.sec.contoso.com. There are two phases
under Frame Summary, one with a source of Client1 and one
with a source of DNS1. Locate the packets with the source of
DNS1 (with destination = Client1).
Things to note in this network conversation are:
In Frame Details, under Dns\Flags,
the AuthenticatedData (AD) flag will be on (“1”) or off
(“0”) depending on whether or not information that was
returned was validated as authentic.
In Frame Details, under Dns\Flags\ARecord, RRSIG data is
returned when the zone is signed as long as the value
of Rcode under Dns\Flags is Success.
2. 10.0.0.2 – 10.0.0.1: A packet exchange between DNS1 (10.0.0.2)
and DC1 (10.0.0.1).
Things to note are:
In Frame Details, under Dns\Flags\ARecord, DNS1 issues a
query for sec.contoso.com of type DNSKEY when a trust
anchor is present on DNS1.
If you started, stopped, and saved a network conversation at each of
the suggested points in the guide, you will have the following
captures:
Expand table