Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Dec 2004
    Posts
    42

    Default Clean up DNS mess.

    Okay I have a bit of a DNS mess on my hands. i am hoping there is a simple solution out there and maybe someone here can point me in that direction.

    Here's a quick synopsis of how we got into this mess.

    Years ago we ran our servers with clustered DNS and we did so using the Round Robin set up, so all dns zones were synced between all servers.

    After about 6 months of that we launched a DNS Only box and synced to that as well as syncing to one other server that we use for a couple corporate websites and as our other DNS server.

    Everything worked great, as we made changes (such as moving accounts between servers which we did) the updated zones were synced to the DNS servers and life was good.

    However I never cleaned up the zones off the old servers. Since they were once running in round robin we still had zones for all domains on all servers stored on almost all servers.

    Skip ahead another 2 years and we moved all of our servers into our own IP space. When I ran the scripts to update the DNS Zones to the new IP's they updated all the zones, including the old zones that were meant for other servers that were still laying around due to the old Round Robin days.

    So when we synced with the DNS server it made a mess, zones were all overwriting each other, etc.

    We quickly killed syncing and manually moved whatever zones around to the DNS servers that we had to so that everything pointed to the correct place.

    I still have not re-enabled syncing, so everytime a domain is added I am manually syncing the DNS zones from whatever server they are added on to the DNS server.

    I really want to fix this mess.

    I know what needs to be done, I need to get it so that each server only has a copy of the DNS records that are used on that particular server and all the other unused zones are removed. Then I will launch a new DNS server and sync one server at a time to that new machine.

    So the big thing is, what is the easiest way to clean out the old unused DNS records off each box?

    I see there is a script /scripts/cleandns8 but I am not sure if that will do what I want

    I guess I need a script that compares the zones in named.conf to the apache entries in httpd.conf and if there is a zone without a site it will remove it from named.conf and nuke the zone.

    Does the cleandns8 script do that? If not is there one that does?

    Does anyone else see a different solution I should be looking for?

    Thanks in advance for your help.

  2. #2
    Member
    Join Date
    Sep 2008
    Posts
    31

    Default

    I believe that /scripts/rebuilddnsconfig is what you are looking for.
    cPanelConfig.com - The fastest growing cPanel configuration guide on the net

  3. #3
    Member
    Join Date
    Dec 2004
    Posts
    42

    Default

    I was just turning down a box that was part of this mess, so I figured it would be a perfect test subject.

    The box only has about 10 domains on it but due to the sync issue described in my first post there are a few hundred DNS records on the server.

    I ran the /scripts/rebuilddnsconfig and there are still all of those extraneous DNS records on the box.

    Is there a different script that does a better job of cleaning this up?

  4. #4
    Member
    Join Date
    Oct 2006
    Posts
    11

    Lightbulb Clean DNS Records

    You can do this following this steps:

    SSH to the server.

    cd /var/named
    mkdir OLD
    mv * OLD
    /scripts/dnscluster syncall


    Make sure at least one of the dns in the cluster have the local server zones.

    Regards

    --
    Imagina Colombia Web Design - Hosting - Dominios
    Imagina Colombia Hosting

Similar Threads & Tags
Similar threads

  1. dns mess
    By MACscr in forum cPanel and WHM Discussions
    Replies: 15
    Last Post: 09-08-2010, 02:50 PM
  2. httpd.conf mess
    By Worelock in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 02-26-2010, 03:11 PM
  3. My cPanel is a mess
    By whyverne6 in forum New User Questions
    Replies: 4
    Last Post: 02-16-2009, 04:39 PM
  4. DNS Mess
    By roenick92 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-09-2006, 02:59 AM
  5. Mail Mess
    By BC2 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-21-2003, 02:03 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube