Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I got a problem with centOS 6.3 64-bit. I want to setup my nameserver with bind here. I am listing all my configuration

[root@izyon92 ~]# cat/etc/hosts
--------------

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
182.19.26.92 izyon92.zyonize1.com izyon92


[root@izyon92 ~]# cat /etc/sysconfig/network
---------------------------------------------
NETWORKING=yes
HOSTNAME=izyon92.zyonize1.com
GATEWAY=182.19.26.89

[root@izyon92 ~]# cat /etc/resolv.conf
--------------------------------------------
# Generated by NetworkManager
search zyonize1.com
nameserver 182.19.26.92

[root@izyon92 ~]# 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     { 182.19.26.92; };
        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";
};

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";

[root@izyon92 ~]# cat /etc/named.rfc1912.zones
--------------------------------------------------
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
// and http://www.ietf.org/internet-drafts/draft-ietf-dnsop-default-local-zones-02.txt
// (c)2007 R W Franks
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

zone "localhost.localdomain" IN {
        type master;
        file "named.localhost";
        allow-update { none; };
};

zone "localhost" IN {
        type master;
        file "named.localhost";
        allow-update { none; };
};

zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
        file "named.loopback";
        allow-update { none; };
};

zone "1.0.0.127.in-addr.arpa" IN {
        type master;
        file "named.loopback";
        allow-update { none; };
};

zone "0.in-addr.arpa" IN {
        type master;
        file "named.empty";
        allow-update { none; };
};

zone "zyonize1.com" {
        type master;
        file "/var/named/zyonize.com.hosts";
};


[root@izyon92 ~]# cat /var/named/zyonize.com.hosts
---------------------------------------------------------
$ttl 38400

zyonize1.com.    IN      SOA     182.19.26.92. dev\.izyon.gmail.com. (

                        1347436958

                        10800

                        3600

                        604800

                        38400 )

zyonize1.com.    IN      NS      182.19.26.92.

zyonize1.com.    IN      A       182.19.26.92

www.zyonize1.com.        IN      A       182.19.26.92

izyon92.zyonize1.com.    IN      A       182.19.26.92



I have disabled selinux and stopped iptables.

dig and nslookup is working fine in the same machine 


[root@izyon92 ~]# dig zyonize1.com
----------------------------------------

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.2 <<>> zyonize1.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55751
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;zyonize1.com.                  IN      A

;; ANSWER SECTION:
zyonize1.com.           38400   IN      A       182.19.26.92

;; AUTHORITY SECTION:
zyonize1.com.           38400   IN      NS      182.19.26.92.

;; Query time: 0 msec
;; SERVER: 182.19.26.92#53(182.19.26.92)
;; WHEN: Fri Sep 14 00:09:19 2012
;; MSG SIZE  rcvd: 72


[root@izyon92 ~]# nslookup zyonize1.com
----------------------------------------------
Server:         182.19.26.92
Address:        182.19.26.92#53

Name:   zyonize1.com
Address: 182.19.26.92

But here is the problem I am facing, I have windows machine, to test this dns and nameserver I set the first IPv4 DNS server to 182.19.26.92. Here is the details

Connection-specific DNS Suffix: 
Description: Realtek PCIe GBE Family Controller
Physical Address: ‎14-FE-B5-9F-3A-A8
DHCP Enabled: No
IPv4 Address: 192.168.2.50
IPv4 Subnet Mask: 255.255.255.0
IPv4 Default Gateway: 192.168.2.1
IPv4 DNS Servers: 182.19.26.92, 182.19.95.66
IPv4 WINS Server: 
NetBIOS over Tcpip Enabled: Yes
Link-local IPv6 Address: fe80::45cc:2ada:c13:ca42%16
IPv6 Default Gateway: 
IPv6 DNS Server: 

when I am pining from this machine it is not finding the server.

Where as in another server with another live IP with Fedora ping is working fine.

share|improve this question
    
Are the Windows machines and Fedora machines on the same network? Could be a routing issue. –  Andrew Case Sep 13 '12 at 19:24
    
Yes they are in same network –  user135855 Sep 14 '12 at 16:13

2 Answers 2

I have some questions, but I don't have enough rep to comment yet, so I'll propose it as an answer with room for followup.

First, I think you're having a network issue, not a dns issue. If you're unable to ping the ip (182.19.26.92), then you probably have a network connectivity issue on the 182.19.26.92 server. I'd be curious to see the output of ifconfig and to know if this is behind a NAT. It might also be helpful to see the output of the interface config files: for x in /etc/sysconfig/network-scripts/ifcfg-* ; do echo $x: ; cat $x ; done

Also, (probably not related to your current issue, but an issue nonetheless) your zone file /var/named/zyonize.com.hosts looks incorrect to me. Here's a diff showing the changes I'd recommend:

--- zonefile.orig   2013-08-22 15:16:08.000000000 -0400
+++ zonefile.new    2013-08-22 15:17:02.000000000 -0400
@@ -1,6 +1,6 @@
 $ttl 38400

-zyonize1.com.    IN      SOA     182.19.26.92. dev\.izyon.gmail.com. (
+zyonize1.com.    IN      SOA     ns1.zyonize1.com dev\.izyon.gmail.com. (

                         1347436958

@@ -12,7 +12,8 @@

                         38400 )

-zyonize1.com.    IN      NS      182.19.26.92.
+zyonize1.com.      IN  NS  ns1.zyonize1.com.
+ns1.zyonize1.com.  IN  A   182.19.26.92

 zyonize1.com.    IN      A       182.19.26.92

You'll note the NS record should point to a name, with an associated glue record, not directly to an IP.

share|improve this answer
    
Yes, the alternative to the answer from @piernov (better if there is truly no answer whatsoever) is network/firewall. And while most likely separate from this particular problem you're absolutely right that both the SOA MNAME and NS record values do refer to names and nothing else. Well spotted :) –  Håkan Lindqvist Apr 8 at 5:59

named should listen on all IPv4 address :

listen-on port 53 { any; }; 

And with :

allow-query     { 182.19.26.92; };

you only allow queries from your server's IP address. You might want to allow queries from everywhere :

allow-query     { any;};
share|improve this answer
    
While you have most likely correctly identified the problem the proposed solution is not good. allow-query {any;}; in combination with recursion yes; is not(!) a good combination for a publicly accessible machine! Please look at the documentation of how the allow-* default values depend on the values of the others. (If one overrides allow-query this also affects allow-recursion!) –  Håkan Lindqvist Apr 8 at 5:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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