-4

I have some problem regarding DNS. I install DNS in CentOS 7 machine and my CentOS machine ip is 192.168.0.155 . If I run nslookup FQDN (centos7.unixmen.local) name then it resolves the IP, which means my forward zone is running, and my output is

nslookup centos7.unixmen.local

Server:     192.168.0.155
Address:    192.168.0.155#53

Name:   centos7.unixmen.local

Address: 192.168.0.155

but if i run

nslookup 192.168.0.155

Server:     192.168.0.155
Address:    192.168.0.155#53

** server can't find 155.0.168.192.in-addr.arpa.: NXDOMAIN

that means reverse zone not resolve to IP to name.

My /etc/named.conf file

options {

        listen-on port 53 {
                127.0.0.1;
                192.168.0.155;
                };
        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; };

*/
        recursion yes;

        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";
        forwarders {
                8.8.8.8;
                8.8.8.4;
                };
        forward first;
};


logging {

        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };

};

zone "." IN {
        type hint;
        file "named.ca";
};


zone "unixmen.local" IN {

      type master;
      file "forward.unixmen";
      allow-update { none;};
};

zone "0.168.192.in-add.arpa" IN {

      type master;
      file "reverse.unixmen";
      allow-update { none; };
};

include "/etc/named.rfc1912.zones";

include "/etc/named.root.key

My Reverse zone configuration file: /var/named/reverse.unixmen

$TTL 86400

@       IN SOA  centos7.unixmen.local. root.unixmen.local.(

                                        2011071001      ; serial
                                        3600            ; refresh
                                        1800            ; retry
                                        604800          ; expire
                                        86400           ; minimum TTL
)

@                IN     NS      centos7.unixmen.local.

@                IN    PTR      unixmen.local.

@                IN      A      192.168.0.155

@                IN     PTR     192.168.0.155

155              IN     PTR     centos7.unixmen.local.

My forward zone file at /var/named/forward.unixmen

$TTL 86400

@       IN SOA  centos7.unixmen.local. root.unixmen.local. (

                                        2011071001      ; serial
                                              3600      ; refresh
                                              1800      ; retry
                                             604800     ; expire
                                             86400      ; minimum TTL
)

@                  IN        NS   centos7.unixmen.local.

@                  IN        A       192.168.0.155

centos7            IN        A       192.168.0.155

In my CentOS 7 machine only one ethernet port and he direct connected to router using ethernet cable and all client window system connected to switch and my

  • ip is 192.168.0.155
  • gateway 192.168.0.1
  • dns-192.168.0.1

Recently if I set my own IP 192.168.0.155 as a DNS IP in CentOS 7 machine then internet browsing working and also forward zone means name to IP is resolving but IP to name is not resolving.

Please help me resolve my problem.

  • 1
    Perhaps edit your question to include the content of the relevant config files. If using your DNS server IP 192.168.0.155 as the DNS being used for internet browsing does not work, then the DNS forwarding configuration is not right. – BeowulfNode42 Feb 23 '17 at 7:42
  • currently if i use my centos ip as a dns then internet browsing are working but ip to name resolution are not working. – reethismanish Feb 23 '17 at 13:20
  • means my forward dns is working but reverse dns are not working – reethismanish Feb 23 '17 at 15:13
  • then can you please edit your question to show the config for your reverse dns zone for that ip range – BeowulfNode42 Feb 23 '17 at 23:21
  • hello i edit the question and also add the forward and reverse zone configuration file then please check .. – reethismanish Feb 24 '17 at 9:50
0

It seems that in your /etc/named.conf file you have a spelling error, it should be

zone "0.168.192.in-addr.arpa" IN {

      type master;
      file "reverse.unixmen";
      allow-update { none; };
};

Note the r in addr.

Also you have pasted in a stray closing comment */ from your /etc/named.conf file near the line saying recursion yes;

  • only one error in zone "0.168.192.in-addr.arpa" IN . I'am written add only r is missing in my thanks bro once again . – reethismanish Mar 1 '17 at 4:14
  • Hello one more problem regarding samba active directory domain controller server.basically i install samba server in centos 7 for file sharing purpose and my samba server working good.and my samba current version is 4.4.4 but my question is can i add this samba into the active directory domain controller. – reethismanish Mar 2 '17 at 9:40
  • @reethismanish Stackexchange sites like serverfault are not discussion forums. If you have an additional question, make a new question page. Though you would need to be more specific than just asking 'how do I join a samba machine to an AD domain?' otherwise the answer will be, 'read the manual'. However, yes, samba 4+ is designed to be able to not only join an AD domain as a member, but also as an option to join the AD as a domain controller. Once you've read the manual and tried with a test system, if you get stuck then ask for clarification on that part. – BeowulfNode42 Mar 2 '17 at 12:32

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.