Reverse DNS how?!?!?

Peter

Verified User
Joined
Jan 15, 2004
Messages
97
Can someone explain me how i should setup reverse DNS because i am searching google, forums etc... but i don't know it very clearly, assume my domain name is blablabla.com and my ip 1.2.3.4

What should i exactly do?

Thanks
 
Do you have control of your reverse dns? I don't know how it works with other hosting companies but we don't let our customers do reverse dns themselves we have to set it up.

This has been mentioned in this board. Please use the search to see if this has been convered before.

Quick rundown:

Let say your block is 192.168.1.1/24

Create a new Domain Name

1.168.192.in-addr.arpa.

Let say you want 192.168.1.1 to be primary.domain.tdl. Create a PTR record:

1.1.168.192.in-addr.arpa. PTR primary.domain.tdl
 
Just do a search :)
http://directadmin.com/forum/showthread.php?s=&threadid=1506&highlight=Reverse+DNS

You need to create a new domain from the admin section. It is the first 3 subnets in reverse order and you add the old ARPA domain to it.

So 192.168.1.1/24 would be the domain 1.168.192.in-addr.arpa. 123.456.7.1/24 would be the domain 7.456.123.in-addr.arpa.

Then each domain in your block you get a PTR record but this time you include all 4 subnets.

So lets say you have ip's from the first block I gave you 192.168.1.1/24 (This is a class C block of 256) . If 192.168.1.2 was the domain example.domain.tdl. After the domain was created with the above information you would make a PTR record like 2.1.168.192.in-addr.arpa. PTR example.domain.tdl.

Hopefully that helps a little. If not post me exactly the ip address and domain and I will write it out for you...
 
Can't i add it in an existing DNS? would be handy.

Domain name: systemworks.nl
IP: 213.196.8.20
NS1 21
NS2 22
 
Hello,

Yes it would be handy, but the dns system wouldn't know which file to look in to get the hostname. All it gets is the IP, so it has to work with that which is why the setting has to be added to the named.conf file.

John
 
Hello,

For a reverse lookup on 1.2.3.4

in your named.conf (RH: /etc/named.conf FBSD: /etc/namedb/named.conf)
Code:
zone "4.3.2.1.in-addr.arpa" IN {
        type master;
        file "/var/named/hostname.db";
};
In /var/named/hostname.db:
Code:
$TTL 0
@       IN      SOA     ns1.domain.com.      root.domain.com. (
                                                2004022000
                                                7200
                                                3600
                                                1209600
                                                86400 )

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

John
 
newest directadmin

Is this text above still valid for the newest version or the same thing available in de admin menu of direct admin ( adding the ptr record i mean)??
 
newest directadmin

Is this text above still valid for the newest version or the same thing available in de admin menu of direct admin ( adding the ptr record i mean)??
 
i still have a question... my domain name is www.sition.nl do i need to create a file hostname.db or just edit sition.nl.db ? i already added a ptr record via directadmin control panel.. at the moment this is my sition.nl.db

i already edited named.conf.. is the only thing i have to do to add the rule:
sition.nl. 14400 IN PTR sition.nl.

????



$TTL 14400
@ IN SOA ns1.sition.nl. root.sition.nl. (
2004032103
7200
3600
1209600
86400 )

sition.nl. 14400 IN NS ns1.sition.nl.
sition.nl. 14400 IN NS ns2.sition.nl.

ftp 14400 IN A 213.247.57.91
localhost.sition.nl. 14400 IN A 127.0.0.1
mail 14400 IN A 213.247.57.91
ns1 14400 IN A 213.247.57.92
ns2 14400 IN A 213.247.57.93
pop 14400 IN A 213.247.57.91
sition.nl. 14400 IN A 213.247.57.91
test 14400 IN A 213.247.57.91
winter 14400 IN A 213.247.57.91
wintersport 14400 IN A 213.247.57.91
www 14400 IN A 213.247.57.91

sition.nl. 14400 IN MX 0 sition.nl.


91.57.247.213.in-addr.arpa 14400 IN PTR mail.sition.nl.
 
Do you want to have RDNS setup? You won't need to go though all of that if you want you can just set it up via the Admin section of the control panel.

I am making assumptions based on your post ip's and host names

Create a new domain:

Domain Name: 57.247.213.in-addr.arpa
IP Address: 1.1.1.1
Name Server 1: ns1.sition.nl.
Name Server 2: ns2.sition.nl.

When you get in your new domain Delete all the records BUT the NS records.

Now if you want to do a reverse for mail:

91.57.247.213.in-addr.arp. PTR mail.sition.nl.
 
Hi all found this script for generating reverse entries.

works great for me after some initial tinkering. http://www.mkrdns.org/

the only issue with it is Direct admin won't display the result :(

maybe a fix for the next ver here's some sample output


$TTL 14400
@ IN SOA dns.aztec-net.com. root.74.50.209.in-addr.arpa. (
2004032407
7200
3600
1209600
86400 )

74.50.209.in-addr.arpa. 14400 IN NS dns.aztec-net.com.
74.50.209.in-addr.arpa. 14400 IN NS ns.aztec-net.com.



$ORIGIN 74.50.209.in-addr.arpa.
2 PTR anet.xmcs.org.
8 PTR mx2.aztec-net.com.
9 PTR mx1.aztec-net.com.
10 PTR aztec-net.com.
20 PTR ip20.mod.aztec-net.com.
21 PTR ip21.mod.aztec-net.com.
22 PTR ip22.mod.aztec-net.com.
 
Hello,

DA shows the dns entries based on their name. So if you have zone "4.3.2.1.in-addr.arpa" ... then you'd just need to have the file: /var/named/4.3.2.1.in-addr.arpa. (maybe a symlink would suffice). Also, the filename in the named.conf file needs to have the full path, else DA won't show it in the list of domains.

John
 
Hi,

to clarify, DirectAdmin shows the reverse zones as domains but when you enter the zone to view the specific records, nothing is displayed. On the above example only the ns records are displayed. the rest are not shown :(

full path is also used in the named.conf file.


Thanks
 
On a FreeBSD system, when I go to the DNS admin page I see my reverse DNS entries :
4.3.2.1.in-addr.arpa

But when I click on it, I get a :
Cannot View Dns Record

Details

Error Reading db file

Is it a bug in DA or is this normal because hostname.db cannot be interpreted by DA?
 
Question:

Do we need PTRs for every domain we host or just a PTR for the mail server IP only?

Thanks,
Ben
 
Last edited:
Back
Top