How to add reverse IP Lookup on your IP's

Any modern verion of DA will be able to do this through the interface. Go to: Admin Level → DNS Administration

Scroll to the bottom to the “Add Zone” section.

Enter your information normally:

domain name: server.hostname.com ip: 1.2.3.4 ns1: ns1.hostname.com ns2: ns2.hostname.com

where server.hostname.com is the hostname of your server. The IP is your server IP (license IP) and ns1/ns2 can be any NS your server uses.

Click the “Create Reverse IP Lookup” checkbox, then click “Add”.

Wait a minute or so, then go into ssh to see if it worked:

dig -x 1.2.3.4

If it works, then you'll see a PTR record with your server name. If it doesn't you'll see a value that says “SOA” with likely your datacenters name beside it. This means that your datacenter has control over the lookup, so you'll have to contact them to set it up, as your server isn't queried when the lookup is done, even if it's correctly setup on your server.

The old fashioned/manual way to add the lookup (depreciated):

To add a reverse lookup on the IP 1.2.3.4, in your named.conf (RH: /etc/named.conf FBSD: /etc/namedb/named.conf) add

    zone "4.3.2.1.in-addr.arpa" IN {
    type master;
    file "/var/named/hostname.db";
};

Note that the IP is written backwards (4.3.2.1). In /var/named/hostname.db:

$TTL 0
@ IN SOA ns1.domain.com. root.domain.com. (
       2004022000
       7200
       3600
       1209600
       86400 )

    NS ns1.domain.com.
    NS ns2.domain.com.
    PTR domain.com.

Now the domain.com. that is in bold will be what is returned with the lookup. You can apply the hostnam.db file to all IPs if you want, just add one zone for each ip in the named.conf using the above method.

*Note: If you do not have authority over the reverse lookup on the IP's you'll have to contact your datacenter to get them to do it for you. This means that your server might not be used at all for the reverse lookup on the IPs, making this tutorial useless :)

 
dns/ip_reverse.txt · Last modified: 2010/02/19 23:14 by muscardin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Please visit Automatic Backlinks to start earning free backlinks Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki scat tube