Sign up ×
Server Fault is a question and answer site for 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
--------------   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 izyon92

[root@izyon92 ~]# cat /etc/sysconfig/network

[root@izyon92 ~]# cat /etc/resolv.conf
# Generated by NetworkManager

[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 {; }; 

        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     {; };
        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/";
                severity dynamic;

zone "." IN {
        type hint;
        file "";

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
// (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 "" IN {
        type master;
        file "named.loopback";
        allow-update { none; };

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

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

zone "" {
        type master;
        file "/var/named/";

[root@izyon92 ~]# cat /var/named/
$ttl 38400    IN      SOA dev\ (





                        38400 )    IN      NS    IN      A        IN      A    IN      A

I have disabled selinux and stopped iptables.

dig and nslookup is working fine in the same machine 

[root@izyon92 ~]# dig

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.2 <<>>
;; 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

;                  IN      A

;; ANSWER SECTION:           38400   IN      A

;; AUTHORITY SECTION:           38400   IN      NS

;; Query time: 0 msec
;; WHEN: Fri Sep 14 00:09:19 2012
;; MSG SIZE  rcvd: 72

[root@izyon92 ~]# nslookup


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 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:
IPv4 Subnet Mask:
IPv4 Default Gateway:
IPv4 DNS Servers:,
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 (, then you probably have a network connectivity issue on the 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/ looks incorrect to me. Here's a diff showing the changes I'd recommend:

--- zonefile.orig   2013-08-22 15:16:08.000000000 -0400
+++    2013-08-22 15:17:02.000000000 -0400
@@ -1,6 +1,6 @@
 $ttl 38400    IN      SOA dev\ (    IN      SOA dev\ (


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

                         38400 )    IN      NS      IN  NS  IN  A    IN      A

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 '14 at 5:59

named should listen on all IPv4 address :

listen-on port 53 { any; }; 

And with :

allow-query     {; };

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 '14 at 5:10

Your Answer


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.