LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-30-2016, 12:08 PM   #1
To learn
LQ Newbie
 
Registered: Aug 2016
Posts: 11

Rep: Reputation: Disabled
When I'm running nslookup10.10.10.3 to resolve the search reverse.The answer I generates as www.10.10.10.in-addr.arpa.and not as www.itssnp.


I set up two machines on my network.

1. ns1.itssnp.edu (This is my DNS master (CentOs))
2. ns2.itssnp.edu (This is my DNS slave (Windows Server 2012))
3. www.itssnp.edu (This is my client machine)

When I 'm running nslookup 10.10.10.3 to resolve the search reverse .
Name I throws It is: www.10.10.10.in-addr.arpa.and not as www.itssnp.edu as itssnp.edu is the name of my domain.


Quote:
[root@apple usuariocc]# nslookup
> 10.10.10.3
Server: 10.10.10.2
Address: 10.10.10.2#53

3.10.10.10.in-addr.arpa name = www.10.10.10.in-addr.arpa.
>
Same is applicable with dig command

Quote:
[root@apple usuariocc]# dig -x 10.10.10.3
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6 <<>> -x 10.10.10.3
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32320
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;3.10.10.10.in-addr.arpa. IN PTR

;; ANSWER SECTION:

3.10.10.10.in-addr.arpa. 86400 IN PTR www.10.10.10.in-addr.arpa.

;; AUTHORITY SECTION:

10.10.10.in-addr.arpa. 86400 IN NS ns1.10.10.10.in-addr.arpa.
10.10.10.in-addr.arpa. 86400 IN NS ns2.10.10.10.in-addr.arpa.

;; ADDITIONAL SECTION:
ns1.10.10.10.in-addr.arpa. 86400 IN A 10.10.10.2
ns2.10.10.10.in-addr.arpa. 86400 IN A 10.10.10.1

;; Query time: 1 msec
;; SERVER: 10.10.10.2#53(10.10.10.2)
;; WHEN: Tue Aug 30 10:35:08 2016
;; MSG SIZE rcvd: 127
I have below configuration for /etc/named.conf file

Quote:
[root@apple usuariocc]# 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 { any; };
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 { any; };
recursion yes;

dnssec-enable yes;
dnssec-validation yes;

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

zone "itssnp.edu" IN {
type master;
file "itssnp.db";
allow-transfer { 10.10.10.1; };

};

zone "10.10.10.in-addr.arpa" IN {
type master;
file "inversa.db";
allow-transfer { 10.10.10.1; };

};
I have below configuration for /var/named/itssnp.db
file,
For the direct search.

Quote:
[root@apple usuariocc]# cat /var/named/itssnp.db
$TTL 1D
@ IN SOA @ webmaster.itssnp.edu. (
2015030901 ; serial
1H ; refresh
1800 ; retry
1W ; expire
3H ) ; minimum
@ NS ns1
ns1 A 10.10.10.2
@ NS ns2
ns2 A 10.10.10.1

www A 10.10.10.3
I have below configuration for /var/named/inversa.db
file,
For the reverse search.

Quote:
[root@apple usuariocc]# cat /var/named/inversa.db
$TTL 1D
@ IN SOA @ webmaster.itssnp.edu. (
2015030903 ; serial
1H ; refresh
1800 ; retry
1W ; expire
3H ) ; minimum
@ NS ns1
ns1 A 10.10.10.2
@ NS ns2
ns2 A 10.10.10.1

1 IN PTR ns1
2 IN PTR ns2
3 IN PTR www
and to the file /etc/resolv.conf is the next

Quote:
[usuariocc@apple ~]$ cat /etc/resolv.conf
# Generated by NetworkManager
search itssnp.edu
domain itssnp.edu
nameserver 10.10.10.2
[usuariocc@apple ~]$

Last edited by To learn; 08-30-2016 at 12:11 PM.
 
Old 08-30-2016, 01:32 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,905
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
It is doing what you told it to:
Zone name is "10.10.10.in-addr.arpa"
PTR record in the zone file is: "3 IN PTR www"

When you do reverse lookup for 10.10.10.3 it finds the record in your zone file. Since you didn't terminate it with a dot it appends the zone name to the record.
www + 10.10.10.in-addr.arpa = www.10.10.10.in-addr.arpa

What you actually want in your inversa.db PTR record is:
3 IN PTR www.itssnp.edu.

Be sure to include the final dot after edu so it knows not to append the 10.10.10.in-addr.arpa to it. Without the dot your dig would return www.itssnp.edu.10.10.10.in-addr.arpa

You have to do PTR records this way because the arpa reverse zone files are NOT authoritative for the domain in your forward zone file but rather simply for the IPs you've described. (Similarly putting PTR records in your forward zone file would be meaningless as it is authoritative for the domain but not the IPs even though it assigns the relationship.) If you had more than one forward zone but only one reverse range of IPs it becomes more clear that you could actually have PTRs records to each of your domains in the inversa.db zone file.

Last edited by MensaWater; 08-30-2016 at 01:40 PM.
 
2 members found this post helpful.
Old 08-30-2016, 02:26 PM   #3
To learn
LQ Newbie
 
Registered: Aug 2016
Posts: 11

Original Poster
Rep: Reputation: Disabled
Thanks

That worked perfectly

Greetings!!!!!
 
1 members found this post helpful.
Old 09-01-2016, 07:59 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,905
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
Glad it helped.

Please go to the thread tools and mark this as solved. It helps others with similar questions in future more quickly find questions with solutions.
 
  


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
[SOLVED] Reverse DNS addr.arpa purpose tripialos Linux - Networking 3 03-17-2016 03:24 AM
reverse dns problem - checking getaddrinfo for nfs-1.lan.0.168.192.in-addr.arpa faile spoovy Linux - Server 8 09-23-2012 02:34 PM
unable to add reverse map from 10.1.168.192.in-addr.arpa. to tftpadmin-desktop.bbnl.i arunrao_erp Linux - Networking 1 11-10-2010 06:02 PM
cachingserver can resolve www.gmail.com, but can not resolve mail.com SeniorGoe Linux - Server 6 06-12-2010 01:10 PM
can't resolve www.yahoo.com w7hd Linux - Networking 2 08-06-2004 11:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:56 PM.

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