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!

changing all the NS records!

Discussion in 'General Discussion' started by tiff2342, May 19, 2012.

  1. tiff2342

    tiff2342 Well-Known Member

    Joined:
    Apr 20, 2012
    Messages:
    140
    Likes Received:
    0
    Trophy Points:
    66
    cPanel Access Level:
    Root Administrator
    ive just setup a new ns2 server how do i change all the old ips on ns1 records to the new ns2 records?

    and how do i change the ns2 ip on the main server?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,897
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    Are you attempting to change the IP address assigned to the name server? If so, that must be completed at the domain registrar. Otherwise, you can utilize the following option to change the IP address for all accounts:

    "WHM >> IP Functions >> IP Migration Wizard"

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,608
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    If the nameserver has a new IP, you'll have to use WHM > Basic cPanel & WHM Setup to revise the nameserver name and/or IP there.

    If the already existing zones need to also be revised, you could use these steps:

    1. Make a copy of /var/named to /var/named-backup

    Code:
    cp -a /var/named /var/named-backup
    2. Replace the nameserver name using a perl command

    Code:
    perl -pi.bak -e "s/oldnameserver/newnameserver/g" *.db
    Please note that you'd replace oldnameserver with the old nameserver name and newnameserver with the new nameserver name.

    3. Update the serial numbers for all the zones and reload named

    Code:
    cd /sbin
    wget http://download.ndchost.com/cpanel-whm/scripts/updateserial/updateserial
    chmod 750 updateserial
    /sbin/updateserial -d /var/named
    Similar steps are detailed in this discussion in our forum other than the serial number increment one:

    http://forums.cpanel.net/f5/bulk-update-dns-zones-267331.html

    I tried the serial increment script noted there myself and it doesn't appear to work, so I opted for the above script instead.

    Thanks!
     
    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