Domain dns problem

Discussion in 'Server Operation' started by daffx, Sep 11, 2017.

  1. daffx

    daffx New Member

    Hello,
    I have a domain problem, so I installed a centos web panel however when I want to create my own nameserver this domain does not work.
    I have bought domain in ovh (glue records / dns servers assigned to server ip)
    intodns.com shows
    Configuration files:
    /etc/named.conf
    Code:
    //
    // named.conf
    //
    // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
    // server as a caching only nameserver (as a any DNS resolver only).
    //
    // See /usr/share/doc/bind*/sample/ for example named configuration files.
    //
    // See the BIND Administrator's Reference Manual (ARM) for details about the
    // configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html
    
    options {
        listen-on port 53 { any; };
        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     { any; };
    
        /*
         - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
         - If you are building a RECURSIVE (caching) DNS server, you need to enable
           recursion.
         - If your recursive DNS server has a public IP address, you MUST enable access
           control to limit queries to your legitimate users. Failing to do so will
           cause your server to become part of large scale DNS amplification
           attacks. Implementing BCP38 within your network would greatly
           reduce such attack surface
        */
        recursion no;
    
        dnssec-enable yes;
        dnssec-validation yes;
    
        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";
    
        managed-keys-directory "/var/named/dynamic";
    
        pid-file "/run/named/named.pid";
        session-keyfile "/run/named/session.key";
    };
    
    logging {
            channel default_debug {
                    file "data/named.run";
                    severity dynamic;
            };
    };
    
    zone "." IN {
        type hint;
        file "named.ca";
    };
    
    include "/etc/named.rfc1912.zones";
    include "/etc/named.root.key";
    
    
    
    // zone daffyy.xyz
    zone "daffyy.xyz" {
                                       type master;
                                            file "/var/named/daffyy.xyz.db";};
    // zone_end daffyy.xyz
    
    zone "ns1.daffyy.xyz" {type master;file "/var/named/ns1.daffyy.xyz.db";};
    zone "ns2.daffyy.xyz" {type master;file "/var/named/ns2.daffyy.xyz.db";};
    
    Zones
    daffyy.xyz
    Code:
    ; Panel %version%
    ; Zone file for daffyy.xyz
    $TTL 14400
    daffyy.xyz.      86400      IN      SOA      ns1.daffyy.xyz.      daffyy.daffyy.xyz.      (
                          2017091115 ;serial, todays date+todays
                          86400 ;refresh, seconds
                          7200 ;retry, seconds
                          3600000 ;expire, seconds
                          86400 ;minimum, seconds
          )
    
    
    daffyy.xyz.      86400      IN      NS      ns1.daffyy.xyz.
    daffyy.xyz.      86400      IN      NS      ns2.daffyy.xyz.
    daffyy.xyz.      0      IN      A      164.132.xxx.xxx
    localhost.daffyy.xyz.      0      IN      A      127.0.0.1
    daffyy.xyz.      0      IN      MX      5      daffyy.xyz.
    mail      0      IN      CNAME      daffyy.xyz.
    www      0      IN      CNAME      daffyy.xyz.
    ftp      0      IN      CNAME      daffyy.xyz.
    ;      Add      additional           
    s1      14400      IN      A      164.132.xxx.xxx
    daffyy.xyz.      14400      IN      TXT      "v=spf1 +a +mx +ip4:164.132.xxx.xxx ~all"
    ns1.daffyy.xyz. 14400 IN A 164.132.xxx.xxx
    ns2.daffyy.xyz. 14400 IN A 164.132.xxx.xxx
    
    
    
    
    
    ns1/2 both similar
    Code:
    ; Panel %version%
    ; Zone file for ns1.daffyy.xyz
    $TTL 14400
    ns1.daffyy.xyz.      86400      IN      SOA      ns1.daffyy.xyz.      info.centos-webpanel.com.      (
                          2013071600 ;serial, todays date+todays
                          86400 ;refresh, seconds
                          7200 ;retry, seconds
                          3600000 ;expire, seconds
                          86400 ;minimum, seconds
          )
    ns1.daffyy.xyz. 86400 IN NS ns1.daffyy.xyz.
    ns1.daffyy.xyz. 86400 IN NS ns2.daffyy.xyz.
    ns1.daffyy.xyz. 14400 IN A 164.132.xxx.xxx
    
    dig
    Code:
    [[email protected] ~]# dig ns daffyy.xyz
    
    ; <<>> DiG 9.9.4-RedHat-9.9.4-50.el7_3.1 <<>> ns daffyy.xyz
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 26821
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;daffyy.xyz.                    IN      NS
    
    ;; Query time: 2 msec
    ;; SERVER: 213.186.33.99#53(213.186.33.99)
    ;; WHEN: Mon Sep 11 19:48:13 CEST 2017
    ;; MSG SIZE  rcvd: 39
    
    [[email protected] ~]# dig ns daffyy.xyz @localhost
    
    ; <<>> DiG 9.9.4-RedHat-9.9.4-50.el7_3.1 <<>> ns daffyy.xyz @localhost
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61111
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 3
    ;; WARNING: recursion requested but not available
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;daffyy.xyz.                    IN      NS
    
    ;; ANSWER SECTION:
    daffyy.xyz.             86400   IN      NS      ns1.daffyy.xyz.
    daffyy.xyz.             86400   IN      NS      ns2.daffyy.xyz.
    
    ;; ADDITIONAL SECTION:
    ns1.daffyy.xyz.         14400   IN      A       164.132.xxx.xxx
    ns2.daffyy.xyz.         14400   IN      A       164.132.xxx.xxx
    
    ;; Query time: 3 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Mon Sep 11 19:48:21 CEST 2017
    ;; MSG SIZE  rcvd: 107
    Domain after 3 days does not work
    Any suggestions?
     
  2. Centos-web panel have some weird setup with namesevers, when you edit nameservers it adds zone without checking if the main domain's zone is present or not..I could see duplicate entries for ns1 and ns2 in main zone and separate zones. Remove A records from main domain and reload and restart dns.
     

Share This Page