The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

rDNS - Reverse DNS - Tutorial

Discussion in 'Bind / DNS / Nameserver Issues' started by wired420, Aug 1, 2007.

  1. wired420

    wired420 Active Member

    Joined:
    Nov 17, 2005
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    Please read the whole article before you attempt this so you don't junk up the internet with false records.

    OK. So I've seen so many people say on there that you MUST contact the data center for each rDNS entry you need. This is totally false and untrue in most cases. Most data centers can add your nameservers, and their ips to have access to reverse the address yourself. This can be done WITH or WITHOUT cPanel. You must email the data center and have them authorize your name servers for reverse access before you attempt this.

    Some information to start with:

    Occets

    An IPv4 IP address is sparated into 4 occets each separated by a period.
    So 12.21.31.xxx being our ip, 12 is the first occet, 21 is the second, and
    so on and so fourth.

    Ok now to the rDNS with cPanel.

    First you must create a in-addr.arpa zone.

    Goto dns functions and click add a dns zone.

    Now this is where you use the occet knowledge. You have an IP block from your dedicated provider.

    For this article we will use 12.21.31.xxx. You will most likely want to choose system or root to manage this domain as you probably don't want your customers messing with rDNS.

    In the IP Box we will type the main IP Address for accessing the server.
    In the domain box we will type: 31.21.12.in-addr.arpa
    Notice that the numbers are still read forward but the fourth occet has been dropped and third occet has been placed first, second occet in the middle, and first occet in the end. This is very important for rDNS to work right.

    Now click submit.

    You now have your PTR zone. It should have your ns1.* and ns2.* name servers listed. As well as a mx entry.

    Now were ready to actually reverse the ip address. This is where the fourth occet of the ip will be picked back up. For the rest of the tutorial we'll assume our ips are 12.21.31.001-12.21.31.003 (Yes I know these aren't real ips as the last occet number is wrong this is to not disturb any ISPs)

    Go to the bottom of your edit dns for this zone.

    Enter your fourth occet of the ips you wish to reverse in the first box in each row in the bottom section of this page. For this tutorial this is 001, 002, 003.

    Switch the drop down for each one to PTR.

    Enter what you wish to reverse in the box just to the right of the drop down we selected PTR in. We'll use ssh.mydomain.com, ns1.mydomain.com and ns2.mydomain.com for this.

    Each address must end in a period such as:
    ssh.mydomain.com.
    ns1.mydomain.com.
    ns2.mydomain.com.

    This period is important as it tells this zone this is the end of what were reversing, and causes BIND to not add the zone file name onto the end.

    So now what we have in first three rows at the bottom of page should look like this.

    001 14400 IN PTR ssh.mydomain.com.
    002 14400 IN PTR ns1.mydomain.com.
    003 14400 IN PTR ns2.mydomain.com.

    Now click save. And your done. You've just set up three ips for reverse dns. Remember to be patient. It can take a bit for the reverse entry to traverse the world. So it doesn't always resolve immediately, tho most hosts only take a couple seconds.

    Any questions? Feel free to post a reply.
     
    #1 wired420, Aug 1, 2007
    Last edited: Aug 14, 2007
    Archmactrix likes this.
  2. TooLittleTime

    TooLittleTime Member

    Joined:
    Apr 4, 2005
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    This has been the most helpful yet. (Why is it cPanel can't put together a users manual?.....)
    Anyway, back on topic: To clarify, do I need a unique IP for each domain I'm running under a Virtual Private Server that is run on cPanel, in order to solve this RDNS issue???
     
  3. TooLittleTime

    TooLittleTime Member

    Joined:
    Apr 4, 2005
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Question 1:
    In your example, you used a domain name and two nameservers. Is it required to reverse the name servers, or can we simply reverse the domain name? I ask because we host a number of domains under a Private Virtual Server (VPS) using cPanel. We are getting email failures due to RDNS, and will need to correct each domain. (All the domains are provided name service resolution under our nameservers of the VPS, which are part of the main VPS account.) I'm assuming each domain will need its own IP in order to resolve (RDNS), "AND" in the set-up you have described, each domain will have it's own PTR line in the new record. Do I have that correct?
    Or, ... do I also have to make a PTR entry for each name server for each domain I enter into the new record???:eek:
     
  4. wired420

    wired420 Active Member

    Joined:
    Nov 17, 2005
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    Yes you can only reverse each IP once. You need a separate IP for each rDNS entry. Further more if it will be used for a medium such as IRC you will also need the IP to correctly resolve foward so that forward and reverse entries match.
     
  5. wired420

    wired420 Active Member

    Joined:
    Nov 17, 2005
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    Not all ISP's require this. Spam ridden ISP's require valid name server addresses and a valid MX entry that matches your mail servers address. The ISP's I know of off of the top of my head that require this for email are AOL, Hotmail, Yahoo, Gmail... Most of the free accounts require this or they will simply drop email as spam that goes to or from your server.
     
  6. wired420

    wired420 Active Member

    Joined:
    Nov 17, 2005
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    Updated!

    I updated a small entry I left out. Most have figured it out on their own apparently but I reread my post the other day and noticed it was missing. Will continue to update if I notice anything that could be done better, or there are changes made. Suggestions welcomed.
     
    #6 wired420, Aug 14, 2007
    Last edited: Aug 14, 2007
  7. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    The last I looked, cPanel represents webhosting management software. The operators are the webhosting service providers. DNS records are not exclusive to cpanel, they only provide easier means of making these adjustments.

    Don't confuse cPanel for replacing the need of understanding and learning basic networking and Linux or whichever platform you are hosting on.
     
  8. dahu

    dahu Member

    Joined:
    Dec 7, 2001
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    im little dummy , so , let me know where im wrong before doing it :

    - My server host many domain
    - my server is host.MYSERVER.com on 111.222.333.444
    -> ns1.MYSERVER.com is 111.222.333.444
    -> ns2.MYSERVER.com is 111.222.333.445

    I have a hosted domain :
    MYDOMAIN.COM with a unique ip : 111.222.333.555

    I have 2 other hosted domain with shared ip :
    MYSHARED1.COM with ip 111.222.333.444
    MYSHARED2.COM with ip 111.222.333.444


    STEP 1 :

    WHM > add DNS
    field IP : 111.222.333.444
    field domain : 333.222.111.in-addr.arpa

    submit

    Right ?

    and then ? Im little (completly) confused. Thank you for dummy like me .
     
  9. cofuzed

    cofuzed Registered

    Joined:
    Oct 8, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I'm in a similar setup... did the above example work for you?

    Thanks...
     
  10. kris1351

    kris1351 Well-Known Member

    Joined:
    Apr 18, 2003
    Messages:
    963
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lewisville, Tx
    cPanel does not now nor has it ever managed rDNS. In fact it doesn't even read the records you make by hand as valid structures from within WHM. If you are going to run rDNS you should do all the zone files by hand and not try to rely on WHM at all. cPanel assumes that very few hosts own their IP networks so it is not a feature they care to worry about in the DNS setups.
     
  11. sarhosting

    sarhosting Well-Known Member

    Joined:
    Oct 1, 2007
    Messages:
    164
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    Twitter:
    Reverse DNS is always done at your datacentre network, it's not server side but your datacentre nameserver side.
     
  12. wired420

    wired420 Active Member

    Joined:
    Nov 17, 2005
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    Quit trolling threads for post counts. This is completely untrue. Any data center can delegate name server authority to your personal name servers. Some may not actually do it for you but they definately have the capability. If your data center doesn't, I'd suggest getting a new one.
     
  13. wired420

    wired420 Active Member

    Joined:
    Nov 17, 2005
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    This is completely untrue as well. Just cause you don't know how to do something doesn't mean it can't be done. I have a server farm with each server running cPanel. Each server controls its very own name space. Every last rDNS entry is made directly through WHM.
     
  14. AngleOfDeath

    AngleOfDeath Member

    Joined:
    Jun 9, 2007
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Is this ip of the server VPS???
    I've a vps server with main ip is 1.2.3.4
    and a range ip from 10.100.101.10->100.100.100.100
    So In the IP Box . it'll 1.2.3.4
    and In the domain box is 101.100.10.in-addr.arpa

    is that right??
    thanks
     
  15. AngleOfDeath

    AngleOfDeath Member

    Joined:
    Jun 9, 2007
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Please help me
    thanks
     
  16. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    It would be greatly appreciated if discussion could be kept civil. If you wish to make rude comments via PM, fine - but please don't pollute the forums with insults.
     
  17. arkain

    arkain Well-Known Member

    Joined:
    Mar 20, 2003
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6

    As a dedicated server, and colocation hosting company. I would like to thank the OP for their his/her time for posting this instructions.

    For those that does not have their ip annouced to their dns server, you would need to have the DC to do this for you or have it routed to your dns server.

    Once again, this instruction works great and healthy :)
     
  18. staylor

    staylor Member

    Joined:
    Aug 29, 2007
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    will this work for mx records my emails are being rejected by major email carriers like AOL and i need reverse dns.
     
  19. wired420

    wired420 Active Member

    Joined:
    Nov 17, 2005
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    You need a fully qualified mail address. Such as mail.server.com. It also needs to properly reverse. You also need valid A entries for your name servers. Many major carriers check these to prevent spam tho it only prevents the idiots from spamming. Not knowledgable spammers.
     
  20. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    To save a whole lot of typing if you edit the dns zone manually from shell

    $GENERATE 0-255 $ PTR xxx-xxx-xxx-$.domain.com.

    Will cover a whole /24 with 1 line.

    Replace xxx with your subnet.
     
Loading...

Share This Page