LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-15-2014, 10:02 AM   #1
sachin.davra
Member
 
Registered: Jul 2013
Posts: 213

Rep: Reputation: Disabled
dns problem


Hi,

I am using centos6 x86. i have configured named service in that machine and i have some local clients machine which uses named service provided by that machine. i have put an entry for every client machine and for some other location internal servers also but reverse lookup doesn't work only for outside server. Could anyone help please.
 
Old 05-15-2014, 10:11 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,578
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
Not enough information.

What is in your named.conf on the DNS server for the reverse zone (arpa.x.x.x usually).

What does the reverse zone file contain?

Do your clients have the IP of this DNS server in /etc/resolv.conf?

Do the client have DNS specified in /etc/nsswitch.conf?
 
Old 05-16-2014, 02:07 AM   #3
sachin.davra
Member
 
Registered: Jul 2013
Posts: 213

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
Not enough information.

What is in your named.conf on the DNS server for the reverse zone (arpa.x.x.x usually).

What does the reverse zone file contain?

Do your clients have the IP of this DNS server in /etc/resolv.conf?

Do the client have DNS specified in /etc/nsswitch.conf?
Answer for 1.
Code:
zone "0.168.192.in-addr.arpa" IN {
	type master;
	file "rev_0.zone";
};
Answer for 2.
Code:
[root@GAIDL-5001 ~]# cat /var/named/rev_0.zone 
$TTL 1D
@	IN SOA	GAIDL-5001.gai.net. root.GAIDL-5001.gai.net. (
					0	; serial
					1D	; refresh
					1H	; retry
					1W	; expire
					3H )	; minimum
@	IN	NS	GAIDL-5001.gai.net.

125	IN	PTR	support.gai.net.
125	IN	PTR	alps.gai.net.
[root@GAIDL-5001 ~]#
Answer for 3.
Code:
[root@GAIDL-5001 ~]# cat /etc/resolv.conf 
nameserver 192.168.50.1
search gai.net
[root@GAIDL-5001 ~]#
Could you help me with question number 4.
 
Old 05-16-2014, 10:47 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,578
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
or my 4th question I was talking about nsswitch.conf (usually /etc/nsswitch.conf). This file determines where to lookup certain information and which order to lookup.

Specifically it can have entry for "hosts" such as:
hosts: db files nisplus nis dns
Or:
hosts: files dns
The first entry says to search a local database first, then "files" (which would be /etc/hosts for UNIX/Linux), then nisplus, then nis then dns. It will stop once any of those give the answer.
The second entry which is more common says to simply first search "files" and if not found search "dns".
You'd only have one uncommented "hosts:" line.

If "files" is in nsswitch.conf for "hosts:" line verify you don't have 192.168.0.125 in /etc/hosts on the client.

From what you originally wrote I'm assuming your forward lookups are working and it is only the reverse that isn't.

Can you connect to port 53 on your nameserver from your client servers?

Does the name server have itself (or "localhost") in its own resolv.conf. If so does dig -x 192.168.0.125 give the correct value when run on the name server itself?

What does the dig -x give when run from the client?

Does "dig -x @192.168.50.1 192.168.0.125" give a different value? than the dig without the @192.168.50.1.

Given that your nameserver is 192.168.50 should your arpa be 192.168.0 or should it be 192.168.50? That is are you actually trying to resolve 192.168.50.125 rather than 192.168.0.125 as implied by your current arpa zone?
 
Old 05-19-2014, 03:26 AM   #5
sachin.davra
Member
 
Registered: Jul 2013
Posts: 213

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
or my 4th question I was talking about nsswitch.conf (usually /etc/nsswitch.conf). This file determines where to lookup certain information and which order to lookup.

Specifically it can have entry for "hosts" such as:
hosts: db files nisplus nis dns
Or:
hosts: files dns
The first entry says to search a local database first, then "files" (which would be /etc/hosts for UNIX/Linux), then nisplus, then nis then dns. It will stop once any of those give the answer.
The second entry which is more common says to simply first search "files" and if not found search "dns".
You'd only have one uncommented "hosts:" line.

If "files" is in nsswitch.conf for "hosts:" line verify you don't have 192.168.0.125 in /etc/hosts on the client.

From what you originally wrote I'm assuming your forward lookups are working and it is only the reverse that isn't.

Can you connect to port 53 on your nameserver from your client servers?

Does the name server have itself (or "localhost") in its own resolv.conf. If so does dig -x 192.168.0.125 give the correct value when run on the name server itself?

What does the dig -x give when run from the client?

Does "dig -x @192.168.50.1 192.168.0.125" give a different value? than the dig without the @192.168.50.1.

Given that your nameserver is 192.168.50 should your arpa be 192.168.0 or should it be 192.168.50? That is are you actually trying to resolve 192.168.50.125 rather than 192.168.0.125 as implied by your current arpa zone?



In nsswitch.conf

Code:
hosts:      files dns

Code:
[root@GAIDL-5001 ~]# dig -x 192.168.0.125

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 <<>> -x 192.168.0.125
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 30251
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;125.0.168.192.in-addr.arpa.	IN	PTR

;; Query time: 0 msec
;; SERVER: 192.168.50.1#53(192.168.50.1)
;; WHEN: Mon May 19 12:53:58 2014
;; MSG SIZE  rcvd: 44

[root@GAIDL-5001 ~]#
from client machine

Code:
[sachin.davra@GAIDL-5015 Desktop]$ dig -x 192.168.0.125

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 <<>> -x 192.168.0.125
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 57116
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;125.0.168.192.in-addr.arpa.	IN	PTR

;; Query time: 6 msec
;; SERVER: 192.168.50.1#53(192.168.50.1)
;; WHEN: Mon May 19 12:55:16 2014
;; MSG SIZE  rcvd: 44
Code:
[sachin.davra@GAIDL-5015 Desktop]$ dig -x 192.168.50.1

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 <<>> -x 192.168.50.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21342
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;1.50.168.192.in-addr.arpa.	IN	PTR

;; ANSWER SECTION:
1.50.168.192.in-addr.arpa. 86400 IN	PTR	GAIDL-5001.gai.net.

;; AUTHORITY SECTION:
50.168.192.in-addr.arpa. 86400	IN	NS	GAIDL-5001.gai.net.

;; ADDITIONAL SECTION:
GAIDL-5001.gai.net.	10800	IN	A	192.168.50.1

;; Query time: 0 msec
;; SERVER: 192.168.50.1#53(192.168.50.1)
;; WHEN: Mon May 19 12:55:45 2014
;; MSG SIZE  rcvd: 105

How should correct it? Kindly help.
 
Old 05-19-2014, 04:42 PM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,578
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
What zone file contains the record for GAIDL-5001.gai.net that you got the reverse to work on above? It isn't in the one you previously posted.
 
Old 05-20-2014, 02:57 AM   #7
sachin.davra
Member
 
Registered: Jul 2013
Posts: 213

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
What zone file contains the record for GAIDL-5001.gai.net that you got the reverse to work on above? It isn't in the one you previously posted.
Actually in my named.conf file i have configured forward lookup zone for one domain and reverse lookup zone for 3 different networks.
Two of them are working for reverse lookup and forward lookup zone is also working fine but only reverse lookup zone is not working. I rechecked named.conf file and zone file also. every thing is same as for other zone files.

GAIDL-5001.gai.net is configured in one of the reverse lookup and forward lookup zone.

Please tell me if you require any log info.
 
Old 05-20-2014, 04:24 AM   #8
sachin.davra
Member
 
Registered: Jul 2013
Posts: 213

Original Poster
Rep: Reputation: Disabled
Thanks guys for your time. Actually problem was in permission of zone files. I changed the owner of that zone to named:named which was not working and reloaded the config and zone files. Now it is working fine.
 
1 members found this post helpful.
  


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 Problem Slicksilver555 Linux - Wireless Networking 21 05-30-2009 05:54 AM
DNS Setup Problem or Godaddy Problem videoman Linux - Networking 1 02-05-2009 05:38 PM
Win2k3 DNS + PFsense DNS Forwarder = No internal DNS resolution Panopticon Linux - Networking 1 11-19-2007 10:59 PM
dns problem bhajan.verma Linux - Enterprise 2 12-19-2006 05:11 AM
problem with dns ! vecs Linux - Software 7 07-22-2003 02:31 PM


All times are GMT -5. The time now is 06:52 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration