{"id":385,"date":"2021-07-23T12:28:53","date_gmt":"2021-07-23T12:28:53","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/how-to-use-mydns-ng\/"},"modified":"2021-07-23T12:28:53","modified_gmt":"2021-07-23T12:28:53","slug":"how-to-use-mydns-ng","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/how-to-use-mydns-ng\/","title":{"rendered":"How to use MyDNS-NG"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n<p>We deprecated the MyDNS and NSD nameservers in cPanel &#038; WHM version 78 and plan to remove them a future release. We strongly recommend that you migrate to PowerDNS. For more information, read our cPanel Deprecation Plan.<\/p>\n<\/p><\/div>\n<\/div>\n<p>MyDNS-NG (MyDNS) is DNS server software for Linux servers. MyDNS uses a database to store the server\u2019s DNS zone files, which allows it to efficiently manage large numbers (hundreds of thousands) of zone records.<\/p>\n<p>MyDNS requires the following minimum configuration to run on your cPanel &#038; WHM server:<\/p>\n<ul>\n<li>cPanel &#038; WHM version 11.32 or later.<\/li>\n<li>MySQL\u00ae version 5.0 or later.<\/li>\n<li>BIND<\/li>\n<\/ul>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>MyDNS does not remove BIND from the system. cPanel &#038; WHM requires the BIND service.<\/li>\n<li>MyDNS does not support Domain Name System Security Extensions (DNSSEC) or PostgreSQL\u00ae.<\/li>\n<\/ul><\/div>\n<\/div>\n<h2 id=\"install-mydns\">Install MyDNS<\/h2>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>Currently, you <strong>cannot<\/strong> install MyDNS during the cPanel &#038; WHM installation process.<\/p>\n<\/p><\/div>\n<\/div>\n<p>To install MyDNS through the WHM interface, perform the following steps:<\/p>\n<ol>\n<li>Navigate to WHM\u2019s <em>Nameserver Selection<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; Service Configuration &gt;&gt; Nameserver Selection<\/em>).<\/li>\n<li>Select <em>MyDNS<\/em>.<\/li>\n<li>Click <em>Save<\/em>.<\/li>\n<\/ol>\n<p>To install MyDNS through the command line, run the following command as the <code>root<\/code> user:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-BASH\" data-lang=\"BASH\">\/usr\/local\/cpanel\/scripts\/setupnameserver mydns<\/code><\/pre>\n<\/div>\n<h2 id=\"return-to-mydns-from-another-dns-server\">Return to MyDNS from another DNS server<\/h2>\n<div class=\"callout callout-warning\">\n<div class=\"callout-heading\">Important:<\/div>\n<div class=\"callout-content\">\n<p>If you change to a different DNS server and then change back to MyDNS, you <strong>must<\/strong> run a forced DNS import and restart MyDNS.<\/p>\n<\/p><\/div>\n<\/div>\n<p>To perform the import and restart MyDNS, perform the following steps:<\/p>\n<ol>\n<li>\n<p>Run the following command as the <code>root<\/code> user to force a DNS import:<\/p>\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>This script will clear the <code>rr<\/code> database table, which will cause DNS lookup errors until your server refreshes that table.<\/li>\n<li>You will receive a confirmation email when this command finishes. Do <strong>not<\/strong> proceed until you receive that email.<\/li>\n<\/ul><\/div>\n<\/div>\n<\/li>\n<li>\n<p>Run the following command as the root user to restart MyDNS:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-BASH\" data-lang=\"BASH\">\/usr\/local\/cpanel\/scripts\/restartsrv_mydns<\/code><\/pre>\n<\/div>\n<\/li>\n<\/ol>\n<h2 id=\"mydns-on-your-server\">MyDNS on your server<\/h2>\n<p>The system installs MyDNS to the <code>\/usr\/local\/cpanel\/3rdparty\/<\/code> directory. After installation, the system syncs the zone files in the <code>\/var\/named\/<\/code> directory with the records in the MyDNS database.<\/p>\n<p>Each server that uses MyDNS includes its own MySQL database for MyDNS. The server\u2019s database name corresponds to the <code>mydns_hostname<\/code> format, where <code>hostname<\/code> represents the server\u2019s hostname.<\/p>\n<h2 id=\"mydns-on-remote-mysql-servers\">MyDNS on remote MySQL servers<\/h2>\n<p>cPanel &#038; WHM\u2019s implementation of MyDNS can function with a remote MySQL server.<\/p>\n<ul>\n<li>To set up the connection to the remote MySQL server, navigate to WHM\u2019s <em>Manage MySQL\u00ae Profiles<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; SQL Services &gt;&gt; Manage MySQL Profiles<\/em>).<\/li>\n<li>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.<\/li>\n<\/ul>\n<h2 id=\"troubleshoot-mydns\">Troubleshoot MyDNS<\/h2>\n<p>Because MyDNS uses a MySQL database to store zone files, any problem with MySQL will affect MyDNS\u2019s performance. If you experience problems with MyDNS, first make certain that MySQL responds.<\/p>\n<p>To confirm that MySQL responds to WHM, perform one of the following actions:<\/p>\n<ul>\n<li>Navigate to WHM\u2019s <em>Show MySQL Processes<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; SQL Services &gt;&gt; Show MySQL Processes<\/em>). If MySQL responds, the system will display the SHOW <code>PROCESSLIST<\/code> query.<\/li>\n<li>Run the following command as the <code>root<\/code> user:\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-BASH\" data-lang=\"BASH\">netstat -tap | grep mysql<\/code><\/pre>\n<\/div>\n<\/li>\n<\/ul>\n<p>If MySQL responds, the system will return information that resembles the following example:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-BASH\" data-lang=\"BASH\">tcp        <span style=\"color:#ae81ff\">0<\/span>      <span style=\"color:#ae81ff\">0<\/span> *:mysql                     <em>:<\/em>                         LISTEN      <span style=\"color:#ae81ff\">17280<\/span>\/mysqld<\/code><\/pre>\n<\/div>\n<p>To troubleshoot MyDNS further, check the following error logs:<\/p>\n<ul>\n<li><code>\/usr\/local\/cpanel\/logs\/error_log<\/code> \u2014 The WHM error log.<\/li>\n<li><code>\/var\/log\/messages<\/code> \u2014 The MyDNS error log.<\/li>\n<li><code>\/usr\/local\/cpanel\/logs\/dnsadmin_log<\/code> \u2014 The <code>dnsadmin<\/code> error log. WHM\u2019s <code>dnsadmin<\/code> service interacts with DNS zone files.<\/li>\n<\/ul><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview Warning: We deprecated the MyDNS and NSD nameservers in cPanel &#038; WHM version 78 and plan to remove them a future release. We strongly recommend that you migrate to PowerDNS. For more information, read our cPanel Deprecation Plan. MyDNS-NG (MyDNS) is DNS server software for Linux servers. MyDNS uses a database to store the &hellip;<\/p>\n","protected":false},"author":1,"featured_media":386,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/385"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=385"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/385\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/386"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}