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.

DNS zone Serial

Discussion in 'Bind / DNS / Nameserver Issues' started by Steini Petur, Apr 24, 2016.

  1. Steini Petur

    Steini Petur Member

    Joined:
    Apr 24, 2016
    Messages:
    12
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Iceland
    cPanel Access Level:
    Root Administrator
    Hey guys,

    All the serials ideas I have seen online here are not working, I am running them against the /var/named/*.db and the "Serial" does not change anymore, Nothing works except "Edit zone and Save" and I have over 7k Zones to do that to.

    2015091222 ;Serial Number

    This for example is the serial on one of my zones, I run what cPanel expert mentions in one thread

    # find /var/named/*.db -mtime -1 -exec perl -pi -e 'if (/^\s+(\d{10})\s+;\s+serial/i) { my $i = $1+1; s/$1/$i/;}' '{}' \;

    This is not fixing it, the number remains 222 at the end except when i edit it via WHM I get 223, and the zone actually starts resolving around the world.

    Im moving 7k Domains from 1 server to another and picking up the IP's there with ARP all is going fine except the updating of serial numbers.. How can i do this ??
     
  2. Steini Petur

    Steini Petur Member

    Joined:
    Apr 24, 2016
    Messages:
    12
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Iceland
    cPanel Access Level:
    Root Administrator
    UPDATE: For anyone that cares I found some code here much more recent then "cPanel Michael" from 2011

    echo "Changing zone serial date"

    sed -i s/'[0-9]\{10\}'/`date +%Y%m%d%H`/ /var/named/*.db

    the sed code here is enough to alter the serial.. thank god.
     
    nootkan likes this.
  3. Steini Petur

    Steini Petur Member

    Joined:
    Apr 24, 2016
    Messages:
    12
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Iceland
    cPanel Access Level:
    Root Administrator
    It's not enough, I still get

    DNS servers responded ERROR: One or more of your nameservers did not respond:
    The ones that did not respond are:
    IP 1 IP 2

    Until I go via WHM and click Edit zone and apply.

    Modifying Zone domain
    zone domain/IN: loaded serial 2016042416 OK
    Bind reloading on dns using rndc zone: [domain]

    DNS servers responded Good. All nameservers listed at the parent server responded.

    What am I missing?? what am i missing after running the sed, and service named reload? that WHM is doing??
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Are you using a DNS cluster? Does it make a difference if you run the "rndc reload" command after making the manual modification?

    Thank you.
     
  5. Steini Petur

    Steini Petur Member

    Joined:
    Apr 24, 2016
    Messages:
    12
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Iceland
    cPanel Access Level:
    Root Administrator
    It does not make difference (I had tried that once, forgot to mention it), I am using the old method its a pure cPanel installation not a DNS only and not a cluster, what we're doing is just move our VPS to a DEDI, so i moved

    /etc/named.conf
    /var/named/*.db

    I also took a copy of the nameserverips and the yml file, When I was done doing this and setting up basic ns on the server, I would ARP the IP from the VPS over to the DNS so basically there is NO change in the IP, but it would not work.

    I ran a command to update the serial, then i did rndc reload or service named reload as well, and still it comes up ERROR but the moment i go from the frontend and edit the record appropriately using your tools and click SAVE it comes in.

    I just don't get what im missing that WHM does?? the IP's are the same everything is same so zone really shouldn't have to change but I cant manually edit 7k zone files to get them to resolve world wide. It's an active server so I need a solution to perform a MASS change and do everything the WHM "Save" button does after editing a record :/
     
  6. Steini Petur

    Steini Petur Member

    Joined:
    Apr 24, 2016
    Messages:
    12
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Iceland
    cPanel Access Level:
    Root Administrator
    Ticket can be closed, figured out my mistake. When i ran the scp -r it reset the user to "root:root" on named folder and named.conf, so when i ran rndc reload it actually failed reloading it then successful.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I'm happy to see you were able to determine the cause of the issue. Thank you for updating us with the outcome.
     
Loading...

Share This Page