edtigo998

Member
Nov 26, 2021
5
0
1
Paraguay
cPanel Access Level
Root Administrator
Hi, I have a starter question
Correct way to use whmapi1 to add a DS record,
I have generated DNSSEC with DNS-zone-manager and it generate only Algorithm 8, 13 and 14 but when I want to add it to the DS zone with (DNS-zone-manager), it only gives me the option to add Algorithm from 1 to 5 (see image below)
I found this url Create DNS zone record · cPanel & WHM Developer Portal but i need need the correct parameters to add a ds Record with the Alforithm 8, is it possible? i want add it wih command line, I want enable DNSSEC and Hardenize: Comprehensive web site configuration test it showme Feature not applicable, not implemented, or disabled, any sugestion, please

1637942088404.png
cpanel_and_whm: 11.100.0
operating_system_name: almalinux
operating_system_version: 8
 

edtigo998

Member
Nov 26, 2021
5
0
1
Paraguay
cPanel Access Level
Root Administrator
I try
whmapi1 --output=jsonpretty \
addzonerecord domain='adomainname.com.py' name=adomainname.com.py. class=IN ttl=14400 type=DS key_tag=2654 algo_num=8 \
digest='53110275d1a61c44d545b6add30c530828037686'

but it fail and delete all DNS records, I have backups and restore the backups
 

cPanelAnthony

Administrator
Staff member
Oct 18, 2021
1,051
106
118
Houston, TX
cPanel Access Level
Root Administrator
I try
whmapi1 --output=jsonpretty \
addzonerecord domain='adomainname.com.py' name=adomainname.com.py. class=IN ttl=14400 type=DS key_tag=2654 algo_num=8 \
digest='53110275d1a61c44d545b6add30c530828037686'

but it fail and delete all DNS records, I have backups and restore the backups
Can you confirm which error occurs when you do this step?
 

edtigo998

Member
Nov 26, 2021
5
0
1
Paraguay
cPanel Access Level
Root Administrator
Can you confirm which error occurs when you do this step?
hi excuse the late reply, sorry
here the error


whmapi1 --output=jsonpretty addzonerecord domain='domain.com' name=domain.com. class=IN ttl=14400 type=DS key_tag=60805 algo_num=8 digest="260aa9c3f80031c23cb758a86dba46cfa7d99fea"
[2021-12-03 22:04:50 -0300] warn [Internal Warning while parsing [stdin] 1201769] Use of uninitialized value $_[5] in join or string at /usr/local/cpanel/Cpanel/ZoneFile.pm line 652.
at /usr/local/cpanel/Cpanel/ZoneFile.pm line 652.
Cpanel::ZoneFile::_build_record(Cpanel::ZoneFile=HASH(0x2740518), "domain.com.", 14400, "IN", "DS", undef, undef, undef, ...) called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 488
Cpanel::ZoneFile::dns_zone_obj_to_zonelines(Cpanel::ZoneFile=HASH(0x2740518), ARRAY(0x263a670), "for_display") called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 452
Cpanel::ZoneFile::serialize_single_record(Cpanel::ZoneFile=HASH(0x2740518), HASH(0x1cd8de0)) called at /usr/local/cpanel/Whostmgr/DNS.pm line 403
Whostmgr::DNS::add_zone_records(ARRAY(0x263a3b8), "domain.com") called at /usr/local/cpanel/Whostmgr/DNS.pm line 431
Whostmgr::DNS::add_zone_record(HASH(0x1cd8de0)) called at /usr/local/cpanel/Whostmgr/API/1/DNS.pm line 210
Whostmgr::API::1::DNS::addzonerecord(HASH(0x1cd8de0), Whostmgr::API::1::Utils::Metadata=HASH(0x1cd11d8), HASH(0x25c39a8)) called at whostmgr/bin/xml-api.pl line 4047
whostmgr::bin::xml_api::__ANON__(Whostmgr::API::1::Utils::Metadata=HASH(0x1cd11d8), HASH(0x1cd8de0), HASH(0x25c39a8), CODE(0x25ba100)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 238
Whostmgr::API::1::Data::Wrapper::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100
eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
Try::Tiny::try(CODE(0x2639f68), Try::Tiny::Catch=REF(0x263a160)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 257
Whostmgr::API::1::Data::Wrapper::execute_internal(CODE(0x25c6878), HASH(0x1cd8de0), HASH(0x25c39a8), HASH(0x25c5d98), CODE(0x25ba100)) called at whostmgr/bin/xml-api.pl line 4252
whostmgr::bin::xml_api::runapp("addzonerecord", HASH(0x25c39a8), HASH(0x1bcdfc0), 0, CODE(0x25ba100)) called at whostmgr/bin/xml-api.pl line 3906
whostmgr::bin::xml_api::script(CODE(0x25ba100), "-json", "addzonerecord") called at whostmgr/bin/xml-api.pl line 3849


[2021-12-03 22:04:50 -0300] warn [Internal Warning while parsing [stdin] 1201769] Use of uninitialized value $_[6] in join or string at /usr/local/cpanel/Cpanel/ZoneFile.pm line 652.
at /usr/local/cpanel/Cpanel/ZoneFile.pm line 652.
Cpanel::ZoneFile::_build_record(Cpanel::ZoneFile=HASH(0x2740518), "domain.com.", 14400, "IN", "DS", undef, undef, undef, ...) called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 488
Cpanel::ZoneFile::dns_zone_obj_to_zonelines(Cpanel::ZoneFile=HASH(0x2740518), ARRAY(0x263a670), "for_display") called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 452
Cpanel::ZoneFile::serialize_single_record(Cpanel::ZoneFile=HASH(0x2740518), HASH(0x1cd8de0)) called at /usr/local/cpanel/Whostmgr/DNS.pm line 403
Whostmgr::DNS::add_zone_records(ARRAY(0x263a3b8), "domain.com") called at /usr/local/cpanel/Whostmgr/DNS.pm line 431
Whostmgr::DNS::add_zone_record(HASH(0x1cd8de0)) called at /usr/local/cpanel/Whostmgr/API/1/DNS.pm line 210
Whostmgr::API::1::DNS::addzonerecord(HASH(0x1cd8de0), Whostmgr::API::1::Utils::Metadata=HASH(0x1cd11d8), HASH(0x25c39a8)) called at whostmgr/bin/xml-api.pl line 4047
whostmgr::bin::xml_api::__ANON__(Whostmgr::API::1::Utils::Metadata=HASH(0x1cd11d8), HASH(0x1cd8de0), HASH(0x25c39a8), CODE(0x25ba100)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 238
Whostmgr::API::1::Data::Wrapper::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100
eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
Try::Tiny::try(CODE(0x2639f68), Try::Tiny::Catch=REF(0x263a160)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 257
Whostmgr::API::1::Data::Wrapper::execute_internal(CODE(0x25c6878), HASH(0x1cd8de0), HASH(0x25c39a8), HASH(0x25c5d98), CODE(0x25ba100)) called at whostmgr/bin/xml-api.pl line 4252
whostmgr::bin::xml_api::runapp("addzonerecord", HASH(0x25c39a8), HASH(0x1bcdfc0), 0, CODE(0x25ba100)) called at whostmgr/bin/xml-api.pl line 3906
whostmgr::bin::xml_api::script(CODE(0x25ba100), "-json", "addzonerecord") called at whostmgr/bin/xml-api.pl line 3849


[2021-12-03 22:04:50 -0300] warn [Internal Warning while parsing [stdin] 1201769] Use of uninitialized value $_[7] in join or string at /usr/local/cpanel/Cpanel/ZoneFile.pm line 652.
at /usr/local/cpanel/Cpanel/ZoneFile.pm line 652.
Cpanel::ZoneFile::_build_record(Cpanel::ZoneFile=HASH(0x2740518), "domain.com.", 14400, "IN", "DS", undef, undef, undef, ...) called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 488
Cpanel::ZoneFile::dns_zone_obj_to_zonelines(Cpanel::ZoneFile=HASH(0x2740518), ARRAY(0x263a670), "for_display") called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 452
Cpanel::ZoneFile::serialize_single_record(Cpanel::ZoneFile=HASH(0x2740518), HASH(0x1cd8de0)) called at /usr/local/cpanel/Whostmgr/DNS.pm line 403
Whostmgr::DNS::add_zone_records(ARRAY(0x263a3b8), "domain.com") called at /usr/local/cpanel/Whostmgr/DNS.pm line 431
Whostmgr::DNS::add_zone_record(HASH(0x1cd8de0)) called at /usr/local/cpanel/Whostmgr/API/1/DNS.pm line 210
Whostmgr::API::1::DNS::addzonerecord(HASH(0x1cd8de0), Whostmgr::API::1::Utils::Metadata=HASH(0x1cd11d8), HASH(0x25c39a8)) called at whostmgr/bin/xml-api.pl line 4047
whostmgr::bin::xml_api::__ANON__(Whostmgr::API::1::Utils::Metadata=HASH(0x1cd11d8), HASH(0x1cd8de0), HASH(0x25c39a8), CODE(0x25ba100)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 238
Whostmgr::API::1::Data::Wrapper::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100
eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
Try::Tiny::try(CODE(0x2639f68), Try::Tiny::Catch=REF(0x263a160)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 257
Whostmgr::API::1::Data::Wrapper::execute_internal(CODE(0x25c6878), HASH(0x1cd8de0), HASH(0x25c39a8), HASH(0x25c5d98), CODE(0x25ba100)) called at whostmgr/bin/xml-api.pl line 4252
whostmgr::bin::xml_api::runapp("addzonerecord", HASH(0x25c39a8), HASH(0x1bcdfc0), 0, CODE(0x25ba100)) called at whostmgr/bin/xml-api.pl line 3906
whostmgr::bin::xml_api::script(CODE(0x25ba100), "-json", "addzonerecord") called at whostmgr/bin/xml-api.pl line 3849


[2021-12-03 22:04:50 -0300] warn [Internal Warning while parsing [stdin] 1201769] Use of uninitialized value $_[5] in join or string at /usr/local/cpanel/Cpanel/ZoneFile.pm line 652.
at /usr/local/cpanel/Cpanel/ZoneFile.pm line 652.
Cpanel::ZoneFile::_build_record(Cpanel::ZoneFile=HASH(0x2740518), "domain.com.", 14400, "IN", "DS", undef, undef, undef, ...) called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 488
Cpanel::ZoneFile::dns_zone_obj_to_zonelines(Cpanel::ZoneFile=HASH(0x2740518), undef, "for_display") called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 615
Cpanel::ZoneFile::_build_zone(Cpanel::ZoneFile=HASH(0x2740518), "for_display") called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 608
Cpanel::ZoneFile::build_zone_for_display(Cpanel::ZoneFile=HASH(0x2740518)) called at /usr/local/cpanel/Whostmgr/DNS.pm line 368
Whostmgr::DNS::_zone_is_valid(Cpanel::ZoneFile=HASH(0x2740518), "domain.com") called at /usr/local/cpanel/Whostmgr/DNS.pm line 434
Whostmgr::DNS::add_zone_record(HASH(0x1cd8de0)) called at /usr/local/cpanel/Whostmgr/API/1/DNS.pm line 210
Whostmgr::API::1::DNS::addzonerecord(HASH(0x1cd8de0), Whostmgr::API::1::Utils::Metadata=HASH(0x1cd11d8), HASH(0x25c39a8)) called at whostmgr/bin/xml-api.pl line 4047
whostmgr::bin::xml_api::__ANON__(Whostmgr::API::1::Utils::Metadata=HASH(0x1cd11d8), HASH(0x1cd8de0), HASH(0x25c39a8), CODE(0x25ba100)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 238
Whostmgr::API::1::Data::Wrapper::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100
eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
Try::Tiny::try(CODE(0x2639f68), Try::Tiny::Catch=REF(0x263a160)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 257
Whostmgr::API::1::Data::Wrapper::execute_internal(CODE(0x25c6878), HASH(0x1cd8de0), HASH(0x25c39a8), HASH(0x25c5d98), CODE(0x25ba100)) called at whostmgr/bin/xml-api.pl line 4252
whostmgr::bin::xml_api::runapp("addzonerecord", HASH(0x25c39a8), HASH(0x1bcdfc0), 0, CODE(0x25ba100)) called at whostmgr/bin/xml-api.pl line 3906
whostmgr::bin::xml_api::script(CODE(0x25ba100), "-json", "addzonerecord") called at whostmgr/bin/xml-api.pl line 3849


[2021-12-03 22:04:50 -0300] warn [Internal Warning while parsing [stdin] 1201769] Use of uninitialized value $_[6] in join or string at /usr/local/cpanel/Cpanel/ZoneFile.pm line 652.
at /usr/local/cpanel/Cpanel/ZoneFile.pm line 652.
Cpanel::ZoneFile::_build_record(Cpanel::ZoneFile=HASH(0x2740518), "domain.com.", 14400, "IN", "DS", undef, undef, undef, ...) called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 488
Cpanel::ZoneFile::dns_zone_obj_to_zonelines(Cpanel::ZoneFile=HASH(0x2740518), undef, "for_display") called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 615
Cpanel::ZoneFile::_build_zone(Cpanel::ZoneFile=HASH(0x2740518), "for_display") called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 608
Cpanel::ZoneFile::build_zone_for_display(Cpanel::ZoneFile=HASH(0x2740518)) called at /usr/local/cpanel/Whostmgr/DNS.pm line 368
Whostmgr::DNS::_zone_is_valid(Cpanel::ZoneFile=HASH(0x2740518), "domain.com") called at /usr/local/cpanel/Whostmgr/DNS.pm line 434
Whostmgr::DNS::add_zone_record(HASH(0x1cd8de0)) called at /usr/local/cpanel/Whostmgr/API/1/DNS.pm line 210
Whostmgr::API::1::DNS::addzonerecord(HASH(0x1cd8de0), Whostmgr::API::1::Utils::Metadata=HASH(0x1cd11d8), HASH(0x25c39a8)) called at whostmgr/bin/xml-api.pl line 4047
whostmgr::bin::xml_api::__ANON__(Whostmgr::API::1::Utils::Metadata=HASH(0x1cd11d8), HASH(0x1cd8de0), HASH(0x25c39a8), CODE(0x25ba100)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 238
Whostmgr::API::1::Data::Wrapper::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100
eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
Try::Tiny::try(CODE(0x2639f68), Try::Tiny::Catch=REF(0x263a160)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 257
Whostmgr::API::1::Data::Wrapper::execute_internal(CODE(0x25c6878), HASH(0x1cd8de0), HASH(0x25c39a8), HASH(0x25c5d98), CODE(0x25ba100)) called at whostmgr/bin/xml-api.pl line 4252
whostmgr::bin::xml_api::runapp("addzonerecord", HASH(0x25c39a8), HASH(0x1bcdfc0), 0, CODE(0x25ba100)) called at whostmgr/bin/xml-api.pl line 3906
whostmgr::bin::xml_api::script(CODE(0x25ba100), "-json", "addzonerecord") called at whostmgr/bin/xml-api.pl line 3849


[2021-12-03 22:04:50 -0300] warn [Internal Warning while parsing [stdin] 1201769] Use of uninitialized value $_[7] in join or string at /usr/local/cpanel/Cpanel/ZoneFile.pm line 652.
at /usr/local/cpanel/Cpanel/ZoneFile.pm line 652.
Cpanel::ZoneFile::_build_record(Cpanel::ZoneFile=HASH(0x2740518), "domain.com.", 14400, "IN", "DS", undef, undef, undef, ...) called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 488
Cpanel::ZoneFile::dns_zone_obj_to_zonelines(Cpanel::ZoneFile=HASH(0x2740518), undef, "for_display") called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 615
Cpanel::ZoneFile::_build_zone(Cpanel::ZoneFile=HASH(0x2740518), "for_display") called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 608
Cpanel::ZoneFile::build_zone_for_display(Cpanel::ZoneFile=HASH(0x2740518)) called at /usr/local/cpanel/Whostmgr/DNS.pm line 368
Whostmgr::DNS::_zone_is_valid(Cpanel::ZoneFile=HASH(0x2740518), "domain.com") called at /usr/local/cpanel/Whostmgr/DNS.pm line 434
Whostmgr::DNS::add_zone_record(HASH(0x1cd8de0)) called at /usr/local/cpanel/Whostmgr/API/1/DNS.pm line 210
Whostmgr::API::1::DNS::addzonerecord(HASH(0x1cd8de0), Whostmgr::API::1::Utils::Metadata=HASH(0x1cd11d8), HASH(0x25c39a8)) called at whostmgr/bin/xml-api.pl line 4047
whostmgr::bin::xml_api::__ANON__(Whostmgr::API::1::Utils::Metadata=HASH(0x1cd11d8), HASH(0x1cd8de0), HASH(0x25c39a8), CODE(0x25ba100)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 238
Whostmgr::API::1::Data::Wrapper::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100
eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
Try::Tiny::try(CODE(0x2639f68), Try::Tiny::Catch=REF(0x263a160)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 257
Whostmgr::API::1::Data::Wrapper::execute_internal(CODE(0x25c6878), HASH(0x1cd8de0), HASH(0x25c39a8), HASH(0x25c5d98), CODE(0x25ba100)) called at whostmgr/bin/xml-api.pl line 4252
whostmgr::bin::xml_api::runapp("addzonerecord", HASH(0x25c39a8), HASH(0x1bcdfc0), 0, CODE(0x25ba100)) called at whostmgr/bin/xml-api.pl line 3906
whostmgr::bin::xml_api::script(CODE(0x25ba100), "-json", "addzonerecord") called at whostmgr/bin/xml-api.pl line 3849


{
"metadata" : {
"result" : 1,
"reason" : "OK",
"command" : "addzonerecord",
"version" : 1
}
}
 

edtigo998

Member
Nov 26, 2021
5
0
1
Paraguay
cPanel Access Level
Root Administrator
Can you confirm which error occurs when you do this step?
I found wow
thanks... i read the error en I found the solution on file
/usr/local/cpanel/Cpanel/ZoneFile.pm at line 488

the correct way for add DS record was for me this below:

whmapi1 --output=jsonpretty addzonerecord domain='domain.com' name=domain.com. class=IN ttl=14400 type=DS keytag=62794 algorithm=8 digtype=1 digest="27c25c7e75r2b93cjd8d7b98a229cae848863a8e"

I forgot do not look at the error, sorry, in the error was the solution.

but I have not yet been able to make it appear as valid DNSSEC in hardenize.com
do you have any totorial or url to help me? please
 

Attachments

Last edited: