CoCCA and EPP Clients
From CoCCA Registry Services (NZ) Limited
CoCCA EPP module for WHMCS
CoCCAepp registrar module Download
CoCCA maintain a CoCCAepp module for WHMCS, The CoCCA EPP module for WHMCS is on git as a COCCA-WHMCS-EPP-Registrar-Module, you can download CoCCAepp Module directly from here as a ZIP file and install at your WHMCS server.
The Operations Supported by this Module :
Register Domains Renew Domains Manage domain transfers - Request, Approve , Cancel , Reject Modify contact details Manage Domain Nameservers Create child Nameservers Request for a domain deletion Domain Synchronization
Install CoCCAepp registrar module
when you download it, then unzip, you will find file contain all required instructions to install this Module including:
1. Copy the folder 'whoisquery' into the WHMCS installation directory
2. Copy the folder 'COCCAepp' to 'YOUR_PATH_TO_WHMCS/modules/registrars/'
3. In WHMCS's control panel top lime, click on "Setup".
4. Click then on "Products / Services" => "Domain Registrars"
5. Enable COCCA module and then configure it.
6. Configure WHOIS lookup based on port 43 in WHMCS: For WHMCS 6.x:
1. Go to the file 'YOUR_PATH_TO_WHMCS/includes/whoisservers.php' 2. Apend the following at the last line .tld|whois.nic.tld|No Object Found Replace .tld with the extensions that you will be using the script for, and nic.tld with your tld whois server.
For WHMCS 7.x: In WHMCS 7.x The WHOIS Server definitions can be found in /resources/domains/dist.whois.json, we need to check if our TLD is already exists in dist.whois.json, if exists we need to be ensure the whois format is right as the following:
{
"extensions": ".tld",
"uri": "socket://whois.nic.tld",
"available": "No Object Found"
}
if your TLD does not exists in dist.whois.json we should create new file /resources/domains/whois.json to add our TLD with same previous format:
{
"extensions": ".tld",
"uri": "socket://whois.nic.tld",
"available": "No Object Found"
}
Please Replace .tld with the extensions that you will be using the script for, and replace whois.nic.tld with your tld whois server.
7. It's suggested, although not required, to keep the module log enabled in Utilities -> Log -> Log Module, even for production use, to
facilitate the diagnosis of problems reported by customers. By doing so, it won't be necessary to ask the customer to redo a transaction for an issue to be diagnosed.
Enable Domain Sync between WHMCS and Registry
The important issues in WHMCS is enable Domain Sync between WHMCS and Registry SRS, to ensure the Status and the Expiry Date of domains names are same. and the date in WHMCS is always correct, to avoid any failure when renew or update domains. To use this feature (form Admin UI in WHMCs go to Setup --- > General Settings -----> Domains ) tick the option in WHMCS as the following figure:
Then configure the following cron job on your server:
php -q /path/to/home/public_html/whmcspath/crons/domainsync.php
CoCCA Sync Script between WHMCS and Registry
CoCCAEpp Module contain a Sync script "COCCAeppsync.php " to check all domains Status in WHMCs and check their Expiry Dates to sync these domains with Registry Database, to use this script you need to add it as cron job and you can pass the script output to mail command to send an email notification. so just create new file like: CoCCAEpp_sync.sh then paste the following:
#!/bin/bash /bin/php -q /WHMCS_PATH/modules/registrars/COCCAepp/COCCAeppsync.php |/bin/mail -r "do-not-reply@YOUR_WHMCS_HOST" -s "CoCCAEpp Sync Report" YOUR@EMAIL_ADD
then make this script executable by run:
chmod +x CoCCAEpp_sync.sh
Then you can copy file CoCCAEpp_sync.sh to /etc/cron.daily/ folder so it is run every day and you will get an email with script out put.
CoCCA POLL Script between WHMCS and Registry
You can use CoCCAEpp module's script "COCCAeppPoll.php" to sync your domains between WHMCs and Registry, this script use epp poll command to contact Registry to discover and retrieve service messages queued by Registry for WHMcs clients, if the domain transferred away from this client the script will delete this domain from WHMCS. to use this script you can add it to cron job, or you can make new script to pass the script out put to your email address. so just create new file like: CoCCAEpp_Poll.sh then paste the following:
#!/bin/bash /bin/php -q /WHMCS_PATH/modules/registrars/COCCAepp/COCCAeppPoll.php |/bin/mail -r "do-not-reply@YOUR_WHMCS_HOST" -s "CoCCAEpp Poll Report" YOUR@EMAIL_ADD
then make this script executable by run:
chmod +x CoCCAEpp_poll.sh
Then you can copy file CoCCAEpp_poll.sh to /etc/cron.daily/ folder so it is run every day and you will get an email with script out put.
Configuring the EPP domain check availability
To use the EPP domain check Query to check the domain availability as specified in RFC 4931, Just follow those steps:
For WHMCS 6.x:
1. Go to the file 'YOUR_PATH_TO_WHMCS/includes/whoisservers.php' 2. Apend the following at the last line .gtld|http://example.com/whoisquery/query.php?domain=|HTTPREQUEST-Available Replace .gtld with the extensions that you will be using the script for and example.com with your whmcs installation URL.
For WHMCS 7.x:
In WHMCS 7.x The WHOIS Server definitions can be found in /resources/domains/dist.whois.json, we need to check if our TLD is already exists in dist.whois.json, if exists we need to be ensure the whois format is right as the following:
{
"extensions": ".tld",
"uri": "http://example.com/whoisquery/query.php?domain=",
"available": "Available"
}
if your TLD does not exists in dist.whois.json we should create new file /resources/domains/whois.json to add our TLD with same previous format:
{
"extensions": ".tld",
"uri": "http://example.com/whoisquery/query.php?domain=",
"available": "Available"
}
Please Replace .tld with the extensions that you will be using the script for, and replace example.com with your whmcs installation URL.
Configure WHMCS with CoCCAepp Module
you can configure CoCCAepp via WHMCS GUI, just Click on Setup then "Products / Services" => "Domain Registrars", Then you need to active the CoCCAepp module, Then configure it, by provide your Registrar Username and Password, EPP server Hostname, enable TLS and the certificate PATH, then you will get the following image:
Common issues with Installing CoCCA Module
The CoCCA Registry require a encrypted connection to connect the EPP port 700, The connection needs to be encrypted to be parsed, You can connect a socket to EPP without TLS, in this case you won’t get any response though.
you should first ask your Registry administrator to enable the EPP login for your registrar login, by default the registrar EPP login will be disabled, the enable EPP login easy and can be done through CoCCA Registry GUI as the following:
The most common issues when the users install the CoCCAepp module, they get the blank page or timeout when they try to register a domain, this caused because the use does not enable the TLS in CoCCAepp module or does not provide the configuration with the right .pem certificate. to fix this issues, you can append the certificate and the private key into one file, and place it somewhere in the website root.Then configure this path into the COCCAepp module.
You can create a self signed certificate and use it with CoCCAepp module configuration as the following:
Generate a Private Key and a CSR:
openssl req -newkey rsa:2048 -nodes -keyout domain.key -out domain.csr
Generate a Self-Signed Certificate from an Existing Private Key:
openssl req -key domain.key -new -x509 -days 365 -out domain.crt
The certificate example would be as follows:
BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAurnssJJ6kMxrN2WaCDhkIKpi8k1EXUs2fmNmw7ZivD+dgfXS Wt6XP1Rlxcib7i9whXFfRi8/LcRmEpzmXVg2gO5wWk5iz3u2wRv/CE7cnYrJG/ns FoNJIJ73/RGzx4saYxVr7BanT8To2gWTsmDv1zB+73yF4f/dt2OuazBg7NWtTMDp ............................ ...........................
END RSA PRIVATE KEY-----
BEGIN CERTIFICATE-----
MIIEQDCCAyigAwIBAgIQeifDmDI85WTJMncPgsZcGTANBgkqhkiG9w0BAQUFADBe MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMVGhhd3RlLCBJbmMuMR0wGwYDVQQLExRE ............... ............... upmilY6/qEhI+z9mv9KP1Mba7owmOXMrF0qpbmB/GqLiLlMt
END CERTIFICATE-----
EPP-Selftest-Tool
This tools designed to help gTLD applicants prepare for Pre-Delegation Testing (PDT) by clarifying the transformation from input XML to submitted EPP commands. you can test this command with CoCCA software by sending EPP requests and get the EPP responses, more info about this tools here.
This tools easy to install and use, you can just download the pdtepp-test tools then configure the pdtepp.xml file with your TLD and your registry IPv4/IPv6 and the required certificate for TLS connection:
1- install required packages: $ yum install php-pear.noarch perl-XML-Simple* perl-XML-LibXML.x86_64 perl-List-MoreUtils.x86_64 perl-DateTime* perl-Config-IniFiles.noarch 2- Then download and install the pdtepp-test tools: $cd /opt $git clone https://github.com/dotse/EPP-Selftest-Tool.git pdteppclient $cd pdteppclient $git checkout v2.2.0 3- Create working directory, in this directory you will download templates include template file for EPP test, we wil also create log directory inside working dir: $cd /opt/pdteppclient $mkdir /opt/pdteppclient/pdtepp-test $cd /opt/pdteppclient/pdtepp-test $mkdir log $wget http://newgtlds.icann.org/en/applicants/pdt/input-templates-19mar15-en.zip $unzio input-templates-19mar15-en.zip $ mv Input\ templates/* . $ rm -rf Input\ templates $ ls -l rw-r--r--. 1 root root 17043 May 24 12:45 pdtepp.xml 4- add the directory of pdtepp-test tool to PATH: $PATH=$PATH:/opt/pdteppclient 5- edit the file pdtepp.xml then add your TLD and your registry IPv4 and IPv6, and you should change the certificate on this file. 6- after any edit for the pdtepp.xml you should run the following command to take the changes effects: $epp-convert --zone tld 7- you can list all available cases to test by run: $epp-test --list the output will be like this A_pdtConnTest B_pdtConnTest_v6 C_pdtDomCreate01 D_pdtDomCreate02 E_pdtDomCreate03 F_pdtDomRenew01 G_pdtDomTransfer01 H_pdtDomTransfer02 I_pdtDomDelete01 J_pdtConCreate01 K_pdtConDelete01 L_pdtHostDelete01 M_pdtHostUpdate01 N_pdtConUpdate01 O_pdtDomUpdate01 8- you can choice any case to test with your Registry system by run: $ epp-test --case A_pdtConnTest 9- see the /opt/pdteppclient/pdtepp-test/log/A_pdtConnTest.log for any error log for your test case.

