Link to home
Start Free TrialLog in
Avatar of ittechlab
ittechlabFlag for Canada

asked on

dns server setup

i installed bind and setup example.com domain on my centos 6.9.

trying to find what is the causes here.

[root@dns01 ~]# named-checkconf /etc/named.conf
[root@dns01 ~]#

[root@dns01 ~]# named-checkzone example.com /var/named/rev.example.com
zone example.com/IN: loaded serial 2017091501
OK

[root@dns01 ~]# named-checkzone example.com /var/named/fwd.example.com
zone example.com/IN: loaded serial 2017091501
OK


[root@dns01 ~]# host -v -t ns example.com. 192.168.2.91
Trying "example.com"
;; connection timed out; trying next origin
Trying "example.com"
;; connection timed out; no servers could be reached
Avatar of Scott Silva
Scott Silva
Flag of United States of America image

Not following you... Are you saying you actually used example.com and now you can't figure out why a fake domain doesn't resolve?
Avatar of ittechlab

ASKER

[root@dns01 ~]# cat /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
        listen-on port 53 { 127.0.0.1; };
        listen-on-v6 port 53 { none; };
        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; 192.168.2.0/24; };
        allow-query     { any; };
        allow-transfer  { localhost; 192.168.2.0/24; };
        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";
};

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

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

zone "example.com" IN {
        type master;
        file "fwd.example.com";
        allow-update { none; };
};

zone "2.168.192.in-add.arpa" IN {
        type master;
        file "rev.example.com";
        allow-update { none; };
};
[root@dns01 ~]# cat /var/named/fwd.example.com
$TTL 86400
@ IN SOA        dns01.example.com. root.example.com. (
        2017091501      ;serial
        3600            ;refresh
        1800            ;retry
        604800          ;expire
        86400           ;minimum TTL
)
@               IN NS   dns01.example.com.
dns01           IN A    192.168.2.91
[root@dns01 ~]#
[root@dns01 ~]#
[root@dns01 ~]#
[root@dns01 ~]# cat /var/named/rev.example.com
$TTL 86400
@ IN SOA        dns01.example.com. root.example.com. (
        2017091501      ;serial
        3600            ;refresh
        1800            ;retry
        604800          ;expire
        86400           ;minimum TTL
)
@               IN NS   dns01.example.com.
dns01           IN A    192.168.2.91
91              IN PTR  dns01.example.com.
I have setup example.com as a domain.

Trying to resolve after setting up my dns server. did i configured right?
[root@dns01 ~]# cat /etc/resolv.conf
nameserver 192.168.2.91
ASKER CERTIFIED SOLUTION
Avatar of ittechlab
ittechlab
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i found the solution myself.