DNSSEC Setup
On the internet, the DNS service is responsible for translating names into IP addresses; however, DNS on its own has no built-in security mechanism. In other words, because DNS has no mechanism to authenticate the records it receives, there is no guarantee that your site's visitors are taken to your site (and not an attacker's site).
The solution proposed to secure DNS was a protocol called DNSSEC, which adds new records and uses public key infrastructure (PKI) to make it possible to authenticate DNS records. Note that DNSSEC is not a mechanism for encrypting the data exchanged by DNS.
As an authoritative DNS server, Arvancloud provides you with a DS record so you can enable DNSSEC and protect your domain against attacks that happen at the DNS level.
How DNSSEC Works
The DNS service has no built-in mechanism to protect the data it exchanges. By signing DNS records, DNSSEC lets the resolver receive the records, validate them, and make sure the received record really belongs to the domain it wanted to reach and does not come from a fake DNS server belonging to an attacker. When DNSSEC is enabled for your domain, name resolution works as follows:
- The user enters www.example.com in their browser. The browser first checks its cache for the corresponding IP address. If it doesn't find the IP in its cache, it sends a request to the DNS server configured for it (the recursive resolver).
- The recursive resolver, which can be the DNS server provided by your ISP, first searches its cache for the IP address corresponding to that name. If it doesn't find an address, it sends a request to the root server.
- On receiving this request, the root server responds to the recursive resolver with the IP address of the domain's TLD along with the related DS record.
- On receiving this IP, the recursive resolver sends a request to the TLD for the domain's IP address.
- On receiving this request, the TLD sends the recursive resolver the IP address of the Arvancloud DNS servers where the domain's records are stored, along with the related DS record.
- The recursive resolver sends a request to the Arvancloud DNS server to access the domain's records.
- In response, the Arvancloud DNS server sends the RRSIG and DNSKEY records to the recursive resolver.
- The recursive resolver, which now has all the records it needs and has authenticated all upstream servers, finally sends the IP address of www.example.com to the browser, and the browser can access the domain's content.
Enabling DNSSEC in the Arvancloud Panel
Before enabling this feature, note that your registrar (the company that sold you the domain) and your TLD must both support DNSSEC. To enable DNSSEC, go to CDN > DNS Records in the Arvancloud panel. On the page that opens, turn on the DNSSEC option at the bottom of the page.
After you turn on this option, a box containing text opens; this text is your DS record information.
The data in this box, in numbered order, specifies the following:
- Key tag
- Algorithm
- Digest Type
- Digest
To enable DNSSEC via API, you can use the following sample request:
curl --location --request PUT 'https://napi.arvancloud.ir/cdn/4.0/domains/example.com/dns-records/dnssec/actions' \
--header 'authority: napi.arvancloud.ir' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: API KEY' \
--header 'content-type: application/json' \
--data '{"enable":true}'
To disable it, simply change the enable value in the request from true to false.
In the last step, go to the panel of the site you got your domain from and enter this data exactly as requested.