[SOLVED] Problem with bind in Centos 6.

Posted by tiendung_it on 2011/11/25 2:11:39
hi everybody,
I'm trying set up bind on Centos 6. Althought I start named ok, but dns not resolved.:(
Infomation for my config.

Quote:
[root@centos6 ~]# rpm -qa bind* bind-libs-9.7.0-5.P2.el6_0.1.i686 bind-utils-9.7.0-5.P2.el6_0.1.i686 bind-9.7.0-5.P2.el6_0.1.i686 bind-chroot-9.7.0-5.P2.el6_0.1.i686

[root@centos6 named]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:10:2A:D4
inet addr:192.168.1.16 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe10:2ad4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6750 errors:0 dropped:0 overruns:0 frame:0
TX packets:2041 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:711894 (695.2 KiB) TX bytes:247287 (241.4 KiB)
Interrupt:19 Base address:0x2000





file "named.conf"
Quote:
//
// 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 { ::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 { localhost;192.168.1.0/24; };
recursion yes;

dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;

/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
};

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

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

zone "0.0.127.in-addr.arpa" IN {
type master;
file "0.0.127.db";
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.db";

allow-update { none; };
};
zone "relayexits.local" IN {
type master;
file "relayexits.local.db";
allow-update { none; };
};

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


file "1.168.192.db"
Quote:

[root@centos6 named]# cat 1.168.192.db
$TTL 86400
@ IN SOA relayexits.local. root. (
2007121801 ; serial
3600 ; refresh
1800 ; retry
604800 ; expire
86400 ; minimum
)
IN NS relayexits.local.
IN PTR relayexits.local.
IN A 255.255.255.0
16 IN PTR relayexits.local.



file "relayexits.local.db"
Quote:

[root@centos6 named]# cat relayexits.local.db
$TTL 86400
@ IN SOA relayexits.local. root.(
2011071001 ; serial (d. adams)
3600 ; refresh
1800 ; retry
604800 ; expiry
86400 ) ; minimum
IN NS relayexits.local.
IN A 192.168.1.16
IN MX 10 relayexits.local.
web IN A 192.168.1.16



cat /etc/resolv.conf
search relayexits.local
nameserver 192.168.1.16
nameserver 8.8.4.4


Quote:


[root@centos6 named]# service named restart
Stopping named: [ OK ]
Starting named: [ OK ]
[root@centos6 named]# nslookup
> set q=any
> relayexits.local.
Server: 8.8.4.4
Address: 8.8.4.4#53

** server can't find relayexits.local.: NXDOMAIN
>



plz support me solve this problem. tks in advance.

Re: Problem with bind in Centos 6.

Posted by TrevorH on 2011/11/25 2:38:04
Your named.conf says to listen on 127.0.0.1 but your /etc/resolv.conf says to query 192.168.1.16 so it won't get a reply.

Re: [SOLVED] Problem with bind in Centos 6.

Posted by tiendung_it on 2011/11/25 2:45:16
Quote:

TrevorH wrote:
Your named.conf says to listen on 127.0.0.1 but your /etc/resolv.conf says to query 192.168.1.16 so it won't get a reply.


oh, that good, It's works. Tks TrevorH.:D

This Post was from: https://www.centos.org/newbb/viewtopic.php?forum=58&topic_id=34434