BuycPanel Blog

BuycPanel Blog

Latest news and updates

Use of MyDNS-NG For cPanel

Posted by Allura on 19 10 2018.

Introduction
This is a DNS server software for Linux servers. It uses a database in storing the server’s DNS zone files, allowing it to efficiently manage large numbers (hundreds or even thousands) of zone records. This is for:

 	cPanel & WHM version 11.32 or later.
 	MySQL® version 5.0 or later.
 	BIND

It is to note that MyDNS does not remove BIND from the system. The BIND service is required by cPanel and WHM. MyDNS does not support Domain Name System Security Extensions (DNSSEC) or PostgreSQL®.

Install MyDNS
Currently one cannot install MyDNS during the installation process of the cPanel and WHM. It can be installed from either the WHM interface or from the command line.
Steps For Installation From WHM Interface

 	Firstly, one needs to navigate to WHM’s Nameserver Selection interface (WHM >> Home >> Service Configuration >> Nameserver Selection).
 	Then one needs to select MyDNS.
 	Finally, click on Save.

Step For Installation From  The Command…

Introduction

This is a DNS server software for Linux servers. It uses a database in storing the server’s DNS zone files, allowing it to efficiently manage large numbers (hundreds or even thousands) of zone records. This is for:

  • cPanel & WHM version 11.32 or later.
  • MySQL® version 5.0 or later.
  • BIND

It is to note that MyDNS does not remove BIND from the system. The BIND service is required by cPanel and WHM. MyDNS does not support Domain Name System Security Extensions (DNSSEC) or PostgreSQL®.

Install MyDNS

Currently one cannot install MyDNS during the installation process of the cPanel and WHM. It can be installed from either the WHM interface or from the command line.

Steps For Installation From WHM Interface

  • Firstly, one needs to navigate to WHM’s Nameserver Selection interface (WHM >> Home >> Service Configuration >> Nameserver Selection).
  • Then one needs to select MyDNS.
  • Finally, click on Save.

Step For Installation From  The Command Line

Run the following command as the root user to install:

/scripts/setupnameserver mydns

Return To MyDNS From Another DNS Server

One must run a forced DNS import and restart MyDNS if one desires to change to a different DNS server and then change back to MyDNS.

Steps:

  • Run the following command as a root user in order to force a DNS import:

/scripts/importmydnsdb –force

  • Run the following command as a root user in order to restart MyDNS:

/scripts/restartsrv_mydns

MyDNS On One’s Server

MyDNS gets installed by the system to the /usr/local/cpanel/3rdparty/ directory. The system syncs the zone files in the/var/named/ directory with all the records in the MyDNS database after the installation.

Each server using MyDNS has in it: its own MySQL database for MyDNS where the server’s database name corresponds to the mydns_hostname format, the hostname representing the server’s hostname.

MyDNS On Remote MySQL Servers

Steps:

  • One needs to navigate to WHM’s Manage MySQL® Profiles interface (WHM >> Home >> SQL Services >> Setup Remote MySQL Server) in order to set up the connection to the remote MySQL server.
  • Each connected server is seen maintaining its own unique database of zone files when one runs MyDNS on a dedicated MySQL server. The MySQL server recovers these zone files from the servers and does not maintain a central copy of them.

Troubleshoot MyDNS

Steps:

  • One needs to navigate to WHM’s Show MySQL Processes interface (WHM >> Home >> SQL Services >> Show MySQL Processes). The system will automatically display the SHOW PROCESSLIST query if MySQL responds.
  • Run the following command as the root user:

netstat -tap | grep mysql

The system will return information resembling the example if MySQL responds:

tcp        0      0 *:mysql                     *:*                         LISTEN      17280/mysqld

If one wishes to troubleshoot MyDNS further, one can check the following error logs:

  • /usr/local/cpanel/logs/error_log — which is the WHM error log.
  • /var/log/messages— which is the MyDNS error log.
  • /usr/local/cpanel/logs/dnsadmin_log — which is the dnsadmin error log. DNS zone files are interacted by WHM’s dnsadmin service.

Conclusion

This server software helps in managing large number of zone records. Installation and its working process is very technical and easy to use for a user.