Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

DNS zone Serial

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

  1. Steini Petur

    Steini Petur Active Member

    Joined:
    Apr 24, 2016
    Messages:
    26
    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 Active Member

    Joined:
    Apr 24, 2016
    Messages:
    26
    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 Active Member

    Joined:
    Apr 24, 2016
    Messages:
    26
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,936
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Steini Petur

    Steini Petur Active Member

    Joined:
    Apr 24, 2016
    Messages:
    26
    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 Active Member

    Joined:
    Apr 24, 2016
    Messages:
    26
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,936
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    I'm happy to see you were able to determine the cause of the issue. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice