Greetings, I wish to share a tutorial on enabling/using DNSSEC in your CWP install. Now, this assumes that you are running your own dns server in CWP, I do not know how it would work with FreeDNS.
For those that would like more information on DNSSEC, please look
https://www.icann.org/resources/pages/dnssec-what-is-it-why-important-2019-03-05-enThis builds on a previous thread from here:
https://forum.centos-webpanel.com/index.php?topic=9052.msg41413#msg41413I will add the steps from the above link here just for posterity's sake, in case the external link goes stale.
The following steps are for EL/centos/redhat
Note: In the examples below, replace “domain.tld” with your domain name
Step 1: First install haveged to generate keys
yum install -y haveged
systemctl enable haveged
Step 2: Change the Directory to /var/named
cd /var/named/
Step 3: Third generate ZSK Key
dnssec-keygen -L 3600 -a RSASHA256 -b 2048 -r /dev/urandom domain.tld
Step 4: Fourth generate KSK key
dnssec-keygen -L 3600 -r /dev/urandom -f KSK -a RSASHA256 -b 4096 domain.tld
Step 5: add keys to domain zone file
cat /var/named/Kdomain.tld.+008+*.key >> /var/named/domain.tld.db
Step 6: sign the zone file
dnssec-signzone -A -3 $(head -c 1000 /dev/urandom | sha1sum | cut -b 1-16) -N INCREMENT -o domain.tld -t domain.tld.db
Step 7: edit named configuration file
/etc/named.conf and add this line
dnssec-lookaside auto;
** find this line, "dnssec-enable yes;
dnssec-validation yes;" add "
dnssec-lookaside auto;" after it
Step 8: In the same file as the previous step, /etc/named.conf, rename the zone file for the domain being enabled
From
// zone domain.tld
zone "domain.tld" {type master; file "/var/named/domain.tld.db";};
// zone_end domain.tld
To
// zone domain.tld
zone "domain.tld" {type master; file "/var/named/domain.tld.db.signed";};
// zone_end domain.tld
Step 9: Centos/el/RHEL Reload/Restart the named service
service named reload
or
systemctl reload named
In Step 5, this created a file in
/var/named called
dsset-domain.tld. and in this file you will find the keys that you will add to your domain registrar.
domain.tld. IN DS 54216 8 1 927FCC021E55B89F279C9D8580CC6615398630747
domain.tld. IN DS 54216 8 2 D564958A48549F123B1E38AhhhE0CF9C73F5E8F4F2CE2A2442C1893C 7878666F
line 1 Description:
54216=Key Tag,
8=Algorithm,
1=
Digest Type, long string=
DigestOnline 2, the SHA-256 key will generate a space just before the end, when adding it to your registrar, you may have to remove that space.
Now, there is an issue with the current implementation of DNSSEC in CWP, once it is enabled, adding a subdomain will not work. The subdomain will be created in the
/var/named/domain.tld.db but not in in
/var/named/domain.tld.db.signed record, so the sub-domain will never propagate.
The workaround is to run Step 5 and Step 9 after a subdomain is created and after it is deleted.Hope this helps,
Joao