Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
stylenone

Overview

MyDNS-NG (MyDNS) is DNS server software for Linux servers. MyDNS uses a database to store the server's DNS zone files, which allows it to efficiently manage large numbers (hundreds of thousands) of zone records.

MyDNS requires the following minimum configuration to run on your cPanel & WHM server:

  • cPanel & WHM version 11.32 or later.
  • MySQL® version 5.0 or later.
  • BIND
Note
titleNotes:
  • MyDNS does not remove BIND from the system. cPanel & WHM requires the BIND service.
  • MyDNS does not support Domain Name System Security Extensions (DNSSEC) or PostgreSQL®.

Install MyDNS

Note
titleNote:

Currently, you cannot install MyDNS during the cPanel & WHM installation process. 

From the WHM interface

To install MyDNS through the WHM interface, perform the following steps: 

  1. Navigate to WHM's Nameserver Selection interface (WHM >> Home >> Service Configuration >> Nameserver Selection).
  2. Select MyDNS.
  3. Click Save.

From the command line

To install MyDNS through the command line, run the following command as the root user:

Code Block
languagebash
/scripts/setupnameserver mydns 

Return to MyDNS from another DNS server

Warning
titleImportant:

If you change to a different DNS server and then change back to MyDNS, you must run a forced DNS import and restart MyDNS. 

 To perform the import and restart MyDNS, perform the following steps:

  1. Run the following command as the root user to force a DNS import:

    Code Block
    languagebash
    /scripts/importmydnsdb --force


    Warning
    titleWarnings:
    • This script will clear the rr database table, which will cause DNS lookup errors until your server refreshes that table.
    • You will receive a confirmation email when this command finishes. Do not proceed until you receive that email. 


  2. Run the following command as the root user to restart MyDNS:

    Code Block
    languagebash
    /scripts/restartsrv_mydns 


MyDNS on your server

The system installs MyDNS to the /usr/local/cpanel/3rdparty/ directory. After installation, the system syncs the zone files in the /var/named/ directory with the records in the MyDNS database. 

Each server that uses MyDNS includes its own MySQL database for MyDNS. The server's database name corresponds to the mydns_hostname format, where hostname represents the server's hostname.

MyDNS on remote MySQL servers

cPanel & WHM's implementation of MyDNS can function with a remote MySQL server.

  • To set up the connection to the remote MySQL server, navigate to WHM's Manage MySQL® Profiles interface (WHM >> Home >> SQL Services >> Setup Remote MySQL Server).
  • When you run MyDNS on a dedicated MySQL server, each connected server maintains its own unique database of zone files. The MySQL server retrieves these zone files from the servers and does not retain a central copy of them.

Troubleshoot MyDNS

Because MyDNS uses a MySQL database to store zone files, any problem with MySQL will affect MyDNS's performance. If you experience problems with MyDNS, first make certain that MySQL responds.

To confirm that MySQL responds to WHM, perform one of the following actions:

  • Navigate to WHM's Show MySQL Processes interface (WHM >> Home >> SQL Services >> Show MySQL Processes). If MySQL responds, the system will display the SHOW PROCESSLIST query.
  • Run the following command as the root user:

    Code Block
    languagebash
    netstat -tap | grep mysql 

    If MySQL responds, the system will return information that resembles the following example:

    Code Block
    languagebash
    tcp        0      0 *:mysql                     *:*                         LISTEN      17280/mysqld 


To troubleshoot MyDNS further, check the following error logs:

  • /usr/local/cpanel/logs/error_log — The WHM error log.
  • /var/log/messages — The MyDNS error log.
  • /usr/local/cpanel/logs/dnsadmin_log — The dnsadmin error log. WHM's dnsadmin service interacts with DNS zone files.

Additional documentation

Localtab Group


Localtab
activetrue
titleSuggested documentation

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("dns","nameservers") and space = currentSpace()


Localtab
titleFor cPanel users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("dns","nameservers") and label = "cpanel" and space in ("DOC",currentSpace())


Localtab
titleFor WHM users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("dns","nameservers") and label = "whm" and space in (currentSpace(),"DOC")


Localtab
titleFor developers

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("dns","nameservers") and space = "DD"