LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-20-2011, 08:26 AM   #1
yasir453
LQ Newbie
 
Registered: Jan 2010
Posts: 27

Rep: Reputation: 15
DNS problem


Dear Respected All;
I am configuring DNS but it is unable to resolve.The configuration files and the out put of commands is given below.

IP Address=192.168.0.66

/etc/resolv.conf
nameserver 192.168.0.66
nameserver 127.0.0.1
search localdomain

/etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1 localhost.localdomain localhost
#127.0.0.1 homeserver.homedomain.com
192.168.0.66 homeserver.homedomain.com abc
#::1 localhost6.localdomain6 localhost6

/etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=homeserver

/var/named/chroot/etc/named.rfc.zone
// 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/...l-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 "homedomain.com" IN {
type master;
file "homedomain.com.fwd";
allow-update { none; };
};
zone "sports.com" IN {
type master;
file "sports.com.fwd";
allow-update { none; };
};
zone "islam.edu" IN {
type master;
file "islam.edu.fwd";
allow-update { none; };
};
#zone "0.168.192.in-addr.arpa" IN {
# type master;
# file "homedomain.com.rev";
# allow-update { none; };
#};

/var/named/chroot/var/named/homedomain.com.fwd

$ORIGIN homedomain.com.
@ IN SOA homeserver.homedomain.com. root. (
45 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS homeserver.homedomain.com.
homeserver.homedomain.com IN A 192.168.0.66
@ IN MX 10 homeserver.homedomain.com.
www IN CNAME homeserver

/var/named/chroot/var/named/sports.com.fwd
$ORIGIN sports.com.
@ IN SOA homeserver.homedomain.com. root. (
46 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS homeserver.homedomain.com.
@ IN MX 10 homeserver.homedomain.com.

/var/named/chroot/var/named/islam.edu.fwd
$ORIGIN islam.edu.
@ IN SOA homeserver.homedomain.com. root. (
47 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS homeserver.homedomain.com.
@ IN MX 10 homeserver.homedomain.com.


dig MX homedomain.com

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5 <<>> MX homedomain.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 64378
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;homedomain.com. IN MX

;; Query time: 0 msec
;; SERVER: 192.168.0.66#53(192.168.0.66)
;; WHEN: Wed Apr 20 01:11:22 2011
;; MSG SIZE rcvd: 32

[root@homeserver etc]# dig MX sports.com

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5 <<>> MX sports.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 39594
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;sports.com. IN MX

;; Query time: 1 msec
;; SERVER: 192.168.0.66#53(192.168.0.66)
;; WHEN: Wed Apr 20 01:11:43 2011
;; MSG SIZE rcvd: 28
 
Old 04-20-2011, 09:37 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,218
Blog Entries: 1

Rep: Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073Reputation: 2073
Hi,

Quote:
homeserver.homedomain.com IN A 192.168.0.66
You miss the trailing dot in the hostname
Code:
homeserver.homedomain.com. IN A 192.168.0.66
 
Old 04-20-2011, 09:39 AM   #3
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
You are receiving a SERVFAIL error, which indicates that something is wrong with your DNS configuration. The first step would be to look at your log files and see what error messages you are receiving when you try to start/restart your server. What error message(s) are you receiving?

The second thing you can do is use the named-checkconf utility to check your files. See this link for an example.

Also, did you follow any sort of tutorial or information to learn how to setup your files?
 
Old 04-21-2011, 06:35 AM   #4
centos123
Member
 
Registered: Apr 2011
Posts: 397

Rep: Reputation: 16
mention your domain name after root

@ IN SOA homeserver.homedomain.com. root.yourdomainname (

in both forward and reverse domain
 
Old 04-22-2011, 09:58 AM   #5
yasir4533
LQ Newbie
 
Registered: Apr 2011
Posts: 3

Rep: Reputation: 0
DNS problem

hi
when i start DNS the log file shows this type of output and when i try to resolve using nslookup the given reult is also given below.

Output of log file

Apr 22 18:20:26 homeserver named[3609]: starting BIND 9.3.6-P1-RedHat-9.3.6-4.P1.el5 -u named -c /etc/named.caching-nameserver.conf -t /var/named/chroot
Apr 22 18:20:26 homeserver named[3609]: adjusted limit on open files from 1024 to 1048576
Apr 22 18:20:26 homeserver named[3609]: found 2 CPUs, using 2 worker threads
Apr 22 18:20:26 homeserver named[3609]: using up to 4096 sockets
Apr 22 18:20:26 homeserver named[3609]: loading configuration from '/etc/named.caching-nameserver.conf'
Apr 22 18:20:26 homeserver named[3609]: using default UDP/IPv4 port range: [1024, 65535]
Apr 22 18:20:26 homeserver named[3609]: using default UDP/IPv6 port range: [1024, 65535]
Apr 22 18:20:26 homeserver named[3609]: listening on IPv6 interface lo, ::1#53
Apr 22 18:20:26 homeserver named[3609]: listening on IPv4 interface eth0, 192.168.0.66#53
Apr 22 18:20:26 homeserver named[3609]: command channel listening on 127.0.0.1#953
Apr 22 18:20:26 homeserver named[3609]: command channel listening on ::1#953
Apr 22 18:20:26 homeserver named[3609]: the working directory is not writable
Apr 22 18:20:26 homeserver named[3609]: zone 0.in-addr.arpa/IN: loaded serial 0
Apr 22 18:20:26 homeserver named[3609]: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
Apr 22 18:20:26 homeserver named[3609]: zone homedomain.com/IN: loading master file homedomain.com.fwd: permission denied
Apr 22 18:20:26 homeserver named[3609]: zone sports.com/IN: loading master file sports.com.fwd: permission denied
Apr 22 18:20:26 homeserver named[3609]: zone islam.edu/IN: loading master file islam.edu.fwd: permission denied
Apr 22 18:20:26 homeserver named[3609]: running

output of nslookup

nslookup homedomain.com
;; Got SERVFAIL reply from 192.168.0.66, trying next server
;; connection timed out; no servers could be reached
 
Old 04-22-2011, 10:47 AM   #6
centos123
Member
 
Registered: Apr 2011
Posts: 397

Rep: Reputation: 16
chk permission for named file and zone file
 
Old 04-22-2011, 11:57 AM   #7
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
If you are running selinux or apparmor you will need to check the permissions there too. Normally you will also have a set of run time zone files, in a place like /var/lib/bind. You will want these to at least be in the bind group, or even owned by bind, so that bind can have write permissions on them. Bind will create a set of database / journal files that it uses to note changes. This is especially important if you try to do any master-slave or dynamic-dns (with DHCP) updates.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS Setup Problem or Godaddy Problem videoman Linux - Networking 1 02-05-2009 05:38 PM
dns problem saran_sai Linux - Server 1 09-27-2008 10:42 PM
Win2k3 DNS + PFsense DNS Forwarder = No internal DNS resolution Panopticon Linux - Networking 1 11-19-2007 10:59 PM
DNS problem Imster Linux - Newbie 12 07-24-2004 01:49 PM
dns problem socket9001 Linux - Networking 1 06-12-2004 08:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration