Board index Linux DNS

Moderator: chandranjoy

RDNS

Postby chandranjoy » Wed Mar 17, 2010 5:34 pm

RDNS(Reverse DNS):

Reverse DNS lookup (also known as rDNS) is a process to determine the hostname associated with a given IP address.

Typically, the DNS is used to determine what IP address is associated with a given hostname; so to reverse resolve a known IP address is to lookup what the associated hostname for it. A reverse lookup is often referred to simply as reverse resolving, or more specifically reverse DNS lookups.

The most common uses of the reverse DNS are:
=> Anti-spam
=> Network troubleshooting
=> Avoid spammers and phishers using a forward confirmed reverse DNS etc

You can use standard UNIX / Linux utilities such as nslookup, dig or hosts to find out reverse DNS of a given IP address.

Task: Find Reverse DNS for IP 75.126.43.235 under Linux/UNIX
$ host 75.126.43.235


Output:

237.116.43.208.in-addr.arpa domain name pointer innovationframes.com.


IP 75.126.43.235 is reverse mapped to innovationframes.com.
Task: Find Reverse DNS for IP 75.126.43.235 under Linux/UNIX/Windows

OR

dig -x IP


nslookup works under Windows and UNIX like OS's:
nslookup 208.43.116.237

Output:
nslookup 208.43.116.237
;; Got recursion not available from 202.148.202.3, trying next server
Server: 203.145.184.13
Address: 203.145.184.13#53

Non-authoritative answer:
237.116.43.208.in-addr.arpa name = gw.innovationframes.com.

Authoritative answers can be found from:
116.43.208.in-addr.arpa nameserver = ns2.arpa.global-datacenter.com.
116.43.208.in-addr.arpa nameserver = ns1.arpa.global-datacenter.com.
ns2.arpa.global-datacenter.com internet address = 67.228.255.20
ns1.arpa.global-datacenter.com internet address = 67.228.254.20



How can I setup RDNS in Linux?

#vi /etc/named.conf


Add the following entries,

zone "111.90.66.in-addr.arpa" IN {
type master;
file "/var/named/66.90.111.db";
allow-update { none; };
};


Then you will need to create a new zone file something like this.
#vi /var/named/domain.com.db


add the following lines,

$TTL 86400
@ IN SOA ns1.yourhost.com. yourcontact.emailaddress.com. (
2005021601 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expire
86400 ; ttl
)
IN NS ns.yourhost.com.
50 IN PTR WhatEverYouWant.Com.
51 IN PTR WhatEverYouWant.Com.
52 IN PTR WhatEverYouWant.Com.
53 IN PTR WhatEverYouWant.Com.
54 IN PTR WhatEverYouWant.Com.
55 IN PTR WhatEverYouWant.Com.


then,
rndc reload
/etc/init.d/named restart
chandranjoy
Site Admin
 
Posts: 283
Joined: Fri Oct 23, 2009 11:19 pm

Return to DNS

Who is online

Users browsing this forum: No registered users and 1 guest


cron