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.

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:
    16
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    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!
     
Loading...

Share This Page