up vote 1 down vote favorite
1

Total newb question I know, but I just want to be sure.

link|flag

5 Answers

up vote 7 down vote accepted

Just some terminology adjustments here. Reverse DNS isn't setup on your server. Your server is assigned IP addresses and those IP addresses have reverse DNS entries. Those IPs are completely independent of your server.

Get the IP address of your server

$ ip addr show

now check to see if you can resolve it

$ host 1.2.3.4

where 1.2.3.4 is your IP e.g.

$ host 74.125.67.100
100.67.125.74.in-addr.arpa domain name pointer gw-in-f100.1e100.net.

This obviously uses your local nameservers and there is always the possibility that you have records cached if you've previously looked it up and it wasn't there. This is a good method to check whether your provider has setup the rDNS properly for you:

Reverse DNS works by reversing each of the octets of the IP address and using the in-addr.arpa domain. Using the IP I've used above (74.125.67.100) as an example, 74 is the first octet, 125 is the second octet etc.

So in reversing it we get 100.67.125.74 ... now add on in-addr.arpa to the end to get the PTR record for that IP

i.e.

100.67.125.74.in-addr.arpa ptr

dig is the canonical tool for debugging DNS, so to find out where the nameservers are for this class, you need to keep stripping off octets to find them.

e.g.

$ dig +short 67.125.74.in-addr.arpa
$ dig +short 125.74.in-addr.arpa
ns4.google.com.
ns1.google.com.
ns2.google.com.
ns3.google.com.

Right, we have a match. That means ns{1,2,3,4}.google.com handle the reverse records for all IPs 74.125.x.x

So, to query against their nameservers directly, we use:

$ dig +short 100.67.125.74.in-addr.arpa @ns4.google.com ptr
gw-in-f100.1e100.net.
link|flag
2  
For your examples with with dig you could also use the parameter -x to avoid the in-addr.arpa notation. – joschi Nov 19 '09 at 23:31
when I run the dig +short commands I get no response. Is that normal? – trustfundbaby Nov 21 '09 at 22:05
up vote 1 down vote

See Reverse DNS Lookup at http://www.dnsgoodies.com/

link|flag
up vote 0 down vote

(Advance warning) - Specifics may be OS-dependent.

Anyway, forward DNS is used to translate a name to an IP address. Reverse DNS is used to translate an IP address to a name.

One obvious way is to use nslookup (or equivalent) on a known IP address. E.g. nslookup 10.0.0.31 should return the hostname of that machine.

Note however that all you have confirmed is that reverse DNS is configured in some shape or form that at least gives the appearance of correctness for the IP address you have just tested. You have no way of knowing that the same applies to all other hosts on your network, short of testing them all individually.

Bottom line is that you're going to have to go into the DNS management tool relating to your OS and flavour of DNS, and check that everything is as it should be in accordance with the documentation (assuming that the documentation is correct and complete).

link|flag
up vote 0 down vote

Wow !

On Windows Just do this [

c:>nslookup Press Enter

set q=ptr Press Enter

60.63.200.230 Press enter

] You will get Reverse DNS if it exists else You will get a Lovely message saying Non existance domain ! That I am getting right now ! :(

Sandy

link|flag
up vote -4 down vote

here's a quick web based alternative: http://www.showmyip.com/

link|flag
1  
Completely unrelated to the question – bortzmeyer Nov 20 '09 at 7:54
For several reasons such as the fact that showmyip.com may see only a HTTP proxy (if you use one or if there is a transparent proxy). – bortzmeyer Nov 20 '09 at 7:55
considering the original question was "How do you know if reverse dns is setup correctly on your server" i think using a site that shows your reverse dns is a pretty spot on answer. – ampledata Nov 28 '09 at 3:21

Your Answer

get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.