1834354 Members
1931 Online
110066 Solutions
New Discussion

Re: Reverse lookup???

 
SOLVED
Go to solution
PSS SYS ADMIN
Super Advisor

Reverse lookup???

Hi everyone,
I have an hpux11 dns server that resolves all the host of the domain.
I've inserted a new record that is successfully resolved by the hostname. But if I try to resolve the ip the nslookup fails without resolveing he ip.
What i have to verify?

Regards...
PSS
6 REPLIES 6
U.SivaKumar_2
Honored Contributor

Re: Reverse lookup???

Hi,

For reverse lookup to work sucessfully you need to create a reverse zone database file
and point it in /etc/named.conf like forward
zone files.


example file:
; the 12.76.149.in-addr.arpa domain.
@ IN SOA {
niels.physics.groucho.edu.
hostmaster.niels.physics.groucho.edu.
233 360000 3600 3600000 3600
}
2 IN PTR otto.physics.groucho.edu.
4 IN PTR quark.physics.groucho.edu.
5 IN PTR down.physics.groucho.edu.
6 IN PTR strange.physics.groucho.edu.


Figure 8. An excerpt from the named.rev file for network
149.76.

;
; the 76.149.in-addr.arpa domain.
@ IN SOA {
vax12.gcc.groucho.edu.
hostmaster.vax12.gcc.groucho.edu.
233 360000 3600 3600000 3600
}
...
; subnet 4: Mathematics Dept.
1.4 IN PTR sophus.maths.groucho.edu.
17.4 IN PTR erdos.maths.groucho.edu.
23.4 IN PTR gauss.maths.groucho.edu.
...
; subnet 12: Physics Dept, separate zone
12 IN NS niels.physics.groucho.edu.
IN NS gauss.maths.groucho.edu.
niels.physics.groucho.edu. IN A 149.76.12.1
gauss.maths.groucho.edu. IN A 149.76.4.23



12.76.149.in-addr.arpa domain. is the zone name to be included in /etc/named.conf. where
149.76.12.0 is the network address in the example.

regards,
U.SivaKumar


Innovations are made when conventions are broken
U.SivaKumar_2
Honored Contributor

Re: Reverse lookup???

For example , if you have 90.0.0.0 network

Then in /etc/named.conf put this lines
zone "90.in-addr.arpa" in {
type master;
file "named.reverse";
};


named.reverse is the file we have just created

If otto.physics.groucho.edu. has IP address
90.0.0.2 then in named.reverse file you should have a entry like this.

2 IN PTR otto.physics.groucho.edu.

Then restart named.

Now reverse lookup of 90.0.0.2 will give

otto.physics.groucho.edu. as answer.

regards,
U.Sivakumar

Innovations are made when conventions are broken
PSS SYS ADMIN
Super Advisor

Re: Reverse lookup???

I haven't /etc/named.conf file but some host can be reverse resolved , others not why?

Regards...
PSS
Jeff Schussele
Honored Contributor
Solution

Re: Reverse lookup???

Hi PSS,

The reverse file(s) is usually named
/etc/named.data/db.xxx.xxx.xxx
where xxx.xxx.xxx is the subnet IP

Whereas the forward lookup file is usually named
/etc/named.data/db.boota
for an example boota.com domain

The /etc/named.boot file will contain pointers to both these files as follows:

primary boota.com db.boota
primary 3.168.192.IN-ADDR.ARPA db.192.168.3

The db.192.168.3 file would have a reverse entry for each ip in the subnet as follows:

10 IN PTR myhost.boota.com

The db.boota file has forward entries as follows:

myhost IN A 192.168.3.10

Hope this answers your question.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Wilfred Chau_1
Respected Contributor

Re: Reverse lookup???

where did you add your host to? host table or dns? check also your /etc/nsswitch.conf, see if dns is used before files is used in a line starting with hosts.
PSS SYS ADMIN
Super Advisor

Re: Reverse lookup???

Thank you Jeff,
your post was fully exaustive!

Regards...
PSS