dns:dnssec
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dns:dnssec [2023/05/15 08:38] – [Internal DNSSEC] bstafford | dns:dnssec [2025/05/09 13:18] (current) – [Internal DNSSEC] bstafford | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== DNSSEC ====== | ====== DNSSEC ====== | ||
| + | |||
| + | ===== Test Sites ===== | ||
| + | |||
| + | Sites With Good DNSSEC Signatures | ||
| + | * internetsociety.org | ||
| + | * dnssec-tools.org | ||
| + | * dnssec-deployment.org | ||
| + | * sigok.ippacket.stream [[https:// | ||
| + | |||
| + | If you are testing web validation, the addresses are: | ||
| + | * http:// | ||
| + | * http:// | ||
| + | * http:// | ||
| + | |||
| + | Sites With Bad DNSSEC Signatures | ||
| + | * dnssec-failed.org | ||
| + | * rhybar.cz | ||
| + | * sigfail.ippacket.stream [[https:// | ||
| + | |||
| + | On the web, they are: | ||
| + | * http:// | ||
| + | * http:// | ||
| + | |||
| + | ===== DNSSEC ===== | ||
| + | |||
| + | |||
| When in doubt, set ZSK to 1 month lifespan, KSK to 1 year lifespan, Algorithm to RSA-SHA-256 | When in doubt, set ZSK to 1 month lifespan, KSK to 1 year lifespan, Algorithm to RSA-SHA-256 | ||
| + | |||
| + | * 256 = ZSK | ||
| + | * 257 = KSK | ||
| Root cert " | Root cert " | ||
| < | < | ||
| + | |||
| + | ===== Test DNS Resolver ===== | ||
| + | You can test a DNS resolver to see if it is enforcing DNSSEC validation. | ||
| + | |||
| + | From [[https:// | ||
| + | |||
| + | The following query will only return an IP if DNSSEC validation is turned off. If DNSSEC validation is turned on, the resolver will realize that the record did not pass validation. | ||
| + | < | ||
| + | The following record should work regardless of wether or not DNSSEC validation is enabled because it is correctly DNSSEC signed. | ||
| + | < | ||
| ===== Get DNSSEC Keys ===== | ===== Get DNSSEC Keys ===== | ||
| Line 20: | Line 59: | ||
| * 8: Algorithm. 8 = RSA/SHA-256 | * 8: Algorithm. 8 = RSA/SHA-256 | ||
| * AwEAAd7…; Public key | * AwEAAd7…; Public key | ||
| + | |||
| + | ===== Validate Root Key ===== | ||
| + | IANA has the DS Digest of the root [[http:// | ||
| + | |||
| + | Validate the KSK you got from dig with the following command: | ||
| + | < | ||
| + | The output should match one of the digests given by IANA. | ||
| + | |||
| + | Explanation from [[https:// | ||
| + | |||
| + | We have to concatenate the following data: | ||
| + | * \x00: the wire format of the root zone | ||
| + | * \x01\x01: 257 in the flags field (KSK) | ||
| + | * \x03: 3 in the protocol field | ||
| + | * \x08: 8 in the algorithm field (RSA/ | ||
| + | * the public key (remove the white space that the dig commands into the returned KSK) | ||
| + | |||
| + | The [[http:// | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | According to this list, this means that we have to hash the above data with SHA-256. | ||
| + | |||
| + | When we paste the following into a shell, we get the desired result: | ||
| + | < | ||
| + | ===== DNSSEC Flags ===== | ||
| + | Flags in DNS Query Packets ([[https:// | ||
| + | |||
| + | * **DO**: The DO bit is included in a DNS query and is an abbreviation for " | ||
| + | * **AD**: The AD bit is included in a DNS response and is an abbreviation for " | ||
| + | * **CD**: The CD bit is included in a DNS query and is an abbreviation for " | ||
| + | * **AA**: A fourth important flag (bit) that can be present in a DNS packet header is the AA bit. This flag isn't new with DNSSEC, but it can be used when DNSSEC is deployed. The AA bit is included in a DNS response and is an abbreviation for " | ||
| + | |||
| ===== Disabling DNSSEC ===== | ===== Disabling DNSSEC ===== | ||
| Remove the DS records at the parent (via registrar) | Remove the DS records at the parent (via registrar) | ||
| Line 30: | Line 106: | ||
| ===== Internal DNSSEC ===== | ===== Internal DNSSEC ===== | ||
| + | [[https:// | ||
| + | |||
| + | Internal domains should not be DNSSEC signed. If they are truly internal domains, connecting into the chain of trust would be challenging if not impossible. However, there is another concern if the internal domains are receiving DDNS updates, then they will constantly need to re-sign the domain, which could end up being a major performance impact. DNSSEC validation is done by DNS servers, not clients, so if the clients are going to be querying servers that have the authoritative data, there is absolutely nothing to validate. | ||
| + | |||
| DNSSEC for internal authoritative domains. Generally avoid it, it can be more hassle than it’s worth. | DNSSEC for internal authoritative domains. Generally avoid it, it can be more hassle than it’s worth. | ||
| The internal domain either needs to be a real fully resolvable from root domain or you have to make sure that any internal resolvers doing validation have a copy of the KSK. And if you are doing any DDNS then definitely avoid as it will need to constantly churn the signatures and NSEC records. | The internal domain either needs to be a real fully resolvable from root domain or you have to make sure that any internal resolvers doing validation have a copy of the KSK. And if you are doing any DDNS then definitely avoid as it will need to constantly churn the signatures and NSEC records. | ||
| - | Also, to do it properly, you’ll have to split off internal recursive and internal authoritative into two servers. Most people combine internal recursive and internal authoritative on the same server(s) for practical reasons. But in DNSSEC, you cannot vouch for yourself. So the internal authoritative cannot return its own AD flag | + | Also, to do it properly, you’ll have to split off internal recursive and internal authoritative into two servers. Most people combine internal recursive and internal authoritative on the same server(s) for practical reasons. But in DNSSEC, you cannot vouch for yourself. So the internal authoritative cannot return its own AD flag. |
| + | |||
| + | Even if they only sign the external copy, if they enabled validation (depending on how many caching/ | ||
| + | |||
| + | ===== DNSSEC and Forwarding | ||
| + | [[infoblox_nios: | ||
dns/dnssec.1684139901.txt.gz · Last modified: by bstafford
