dns working inside server, not outside

From WebHostingNeeds.com
Jump to: navigation, search

First disable firewall and see if it works. If firewall is blocking, allow port 53 in firewall.

In new cpanel server, problem was due to buggy configuration.

Fixed by editing

vi /etc/named.conf

Find

options {
    listen-on { any; }; /*      updated by cPanel*/
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { localhost; };
        recursion yes;

        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;

        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";

        managed-keys-directory "/var/named/dynamic";
};

Problem was caused by line

allow-query     { localhost; };

Change it to

allow-query     { any; };

Also disable recursion.

Find

recursion yes;

Change yes to no

recursion no;



bind