1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How To change NameServer Ip ?

Discussion in 'Bind / DNS / Nameserver Issues' started by prandah, Jul 1, 2011.

Thread Status:
Not open for further replies.
  1. prandah

    prandah New Member

    Joined:
    Jun 5, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    helo i have problem :(

    when i check to intodnscom i have some error

    on my domain registrar i set it to this

    so i check nameserver on whm

    my question how to change ip

    ns1.domain.com to 216.24.204.236
     
  2. PIS

    PIS New Member

    Joined:
    Jul 2, 2011
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
  3. fi77i

    fi77i Member

    Joined:
    Aug 20, 2008
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Uruguay
    If you have that IP assigned to your server (you can check it via ifconfig), you just only need to edit /etc/nameserverips and change the current IP for the one you need.

    If that IP is not assigned to your server and does not belong to you, you need to change the IP at the registrar for one assigned to your server.

    Have a nice day.
     
  4. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    /etc/nameserverips area does not change the IP in the DNS zone file and has no actual use other than display purposes. This area in WHM > Nameserver IPs is likewise not used to set the actual A records for the DNS zone for the nameservers.

    You would need to edit the DNS zone for the nameserver or domain in WHM > Edit DNS Zone and make sure the IP is correct for both.
     
  5. PPNSteve

    PPNSteve Member

    Joined:
    Mar 13, 2003
    Messages:
    361
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Somewhere in Ilex Forest
    how can we get the WHM > Nameserver IPs to actually show the proper IP? we did edit /etc/nameserverips to proper ones.
    zone files are correct so it all works, but the display of incorrect IPs is annoying.
     
  6. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    The file that actually handles WHM > DNS Functions > Nameserver IPs area is at /var/cpanel/nameserverips.yaml location. If you want this to be changed, you'd want to make a backup of that file, then modify it:

    Code:
    cd /var/cpanel
    cp nameserverips.yaml nameserverips.yaml.bak110711
    vi nameserverips.yaml
     
  7. egillette

    egillette Member

    Joined:
    Jan 5, 2010
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, FL
    Wow,

    Thanks Tristan, I had the same problem and it was driving me bonkers! =0)
     
  8. egillette

    egillette Member

    Joined:
    Jan 5, 2010
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, FL
    It's amazing when you're working on a client's machine, and find the same post later on to help you resolve the same problem yet again. LOL! =0)
     
  9. dyrer

    dyrer Member

    Joined:
    Jun 3, 2005
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    After this Nameserver IP's are empty

     
  10. cPanelMichael

    cPanelMichael Well-Known Member
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    17,523
    Likes Received:
    26
    Trophy Points:
    48
    Please try running the following command:

    Code:
    # /usr/local/cpanel/scripts/updatenameserverips
    Thank you.
     
  11. cPanelTracey

    cPanelTracey cPanel Staff
    Staff Member

    Joined:
    Mar 5, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Houston, TX
    We had received clarification on this feature, and the nameserverips.yaml file from our developers. I wanted to share this to clarify the intended behavior.

    The functionality of the "Nameserver IPs" page was changed in 11.30. It is now a report, and not a page meant to configure any aspect of DNS. It reports the nameservers used by zones on the server, as well as a count of the the number of zones that use a given nameserver.

    The nameserverips.yaml file is automatically updated, and not meant to be altered by hand. The script /usr/local/cpanel/scripts/updatenameserverips populates that file automatically. This script retrieves the information it populates the yaml file with by scanning the zones on the server for NS records, then using /usr/local/cpanel/scripts/quickdnslookup to get the IP.

    The correct way of updating the information on Nameserver IPs is through the "Basic cPanel & WHM Setup" page, and to ensure a proper DNS configuration. If the Nameserver IPs page is presenting incorrect information when DNS is set up correctly, this is a bug and should be reported via a support ticket.
     
  12. whmcpuser

    whmcpuser New Member

    Joined:
    Apr 9, 2012
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Just to add to the discussion. The current whm 11.32.2 (built 15) does not run the script "/usr/local/cpanel/scripts/updatenameserverips" automatically. So, the WHM > DNS Functions > Nameserver IPs screen will likely report wrong number of zones.

    For example, I have 4 DNS zones from my initial setup, I poked around and added new DNS Zones to test out WHM behaviors. Let's say I added 2 zones called test1.com and test2.com. When I go to edit the zones, test1.com and test2.com zones show up on the Main >> DNS Functions >> Edit DNS Zone screen.

    If I delete the 2 test zones by going through Main >> DNS Functions >> Delete a DNS Zone, the zones will be deleted and will not show up on the user interface screen (Main >> DNS Functions >> Edit DNS Zone screen).

    But if I click on Main >> DNS Functions >> Nameserver IPs, the screen will show my nameservers of having 6 zones (instead of only the actual 4 zones). This is a bug that causes a lot of confusion for new users like me as to what the zone numbers mean.

    With the current whm 11.32.2 (built 15), to display the correct zone numbers, you have to log into shell and run this script /usr/local/cpanel/scripts/updatenameserverips to fix the correct display of the zone numbers.

    WHM/cpanel staff should update the code to run the updatenameserverips script automatically when users choose to "Delete a DNS zone"
     
  13. lbeachmike

    lbeachmike Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    Has anything been done on this? I'm configuring a new server, and in needing to update the nameserver settings after the initial setup, I'm finding this extremely clunky and confusing.

    One would expect that the WHM option called Networking Setup -> Nameserver IPs would of course be for setting up nameserver IPs, but as Tristan has noted, it is simply a report - this is confusing and should be fixed.

    In WHM -> Basic cpanel & WHM setup, the option to "Assign IP Address" under "Nameservers" is automatic and doesn't seem to allow the user to specify an IP, so you've gotta play games with reserving IP addresses to get it to do what you want. However, I found that it misbehaves and first assigned an IP that was already reserved and could not be used for the nameserver.

    It also built a zone file for my host name with a .zz after it. The domain for this server hostname is hosted on a different server, but I'm not sure why it built this zone file with the .zz here - perhaps that is expected behavior?

    With the odd behavior for setting up name servers, I do think somebody in cpanel should run through the functionality on a test server and take a close look at it so appropriate improvements and bug-fixes can be implemented.

    Thanks.
     
  14. justauser

    justauser New Member

    Joined:
    Sep 14, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    So is there a solution here or not? This method doesn't seem to work >>> /usr/local/cpanel/scripts/updatenameserverips
    Cpanel, please help, this is ridiculous.
     
  15. justauser

    justauser New Member

    Joined:
    Sep 14, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    So is there a solution here or not? This method doesn't seem to work >>> /usr/local/cpanel/scripts/updatenameserverips
    Cpanel, please help, this is ridiculous.
     
  16. justauser

    justauser New Member

    Joined:
    Sep 14, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I apologize, I posted twice by accident and can't seem to delete the last post.

    - - - Updated - - -

    I apologize, I posted twice by accident and can't seem to delete the last post.
     
  17. cPanelTracey

    cPanelTracey cPanel Staff
    Staff Member

    Joined:
    Mar 5, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Houston, TX
    My apologies that the script isn't doing what you expect. There's not enough information here for us to say why the script is not updating the information in Nameserver IPs. As I had explained, that page simply reports the nameserver setup as configured in your DNS zones. Usually, fixing the information in the DNS zones and running that script fixes the Nameserver IPs report page.

    If that hasn't worked for you, we will be happy to assist. You'll need to open a ticket so our support folks can look into this on your server in more detail. They will be able to help you resolve this.
     
  18. egillette

    egillette Member

    Joined:
    Jan 5, 2010
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, FL
    Keep in mind, it won't work if there are still DNS zones that are using said name server IP's.

    For example, I had a client who's server was setup to be using NS1, NS2, NS3, NS4, NS5 and NS6. . .

    He had setup a few domains himself and erroneously used NS7 and NS8 -- so of course the NameServer IP's page reflected this, and showed the IP as 67.215.65.132 (which is OpenDNS' nxdomain IP response), so I knew that he didn't actually have these setup, but indeed used them.

    While the script doesn't run automatically, if you update the zones to ensure none of them are using the nameservers in questions (in my client's case, it was NS7 and NS8), after you run the script, the values will be updated, and in the case of NameServer IP's you don't want to be on that "report page", they will be removed after the script runs.

    Summary:

    1) Identify what NameServer IP's are erroneous (should be the easy part)

    2) Click on the number of zones using said incorrect NameServer IP's.

    3) From the "Edit Zones" page, click each zone, and ensure that the incorrect NS is not being used in the SOA record or NS records for the zones displayed (i.e. change the SOA and NS records to reflect the one that is correct).

    4) Login via SSH to your server either and execute the following either as root or using sudo:

    /usr/local/cpanel/scripts/updatenameserverips

    And voila. . .problem solved -- your NameServer IP "report" page displays proper values and NS records in use.

    Hope this helps! :)
     
  19. r3chn3r

    r3chn3r New Member

    Joined:
    Oct 4, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I'm actually having the same problem. I'm just trying to kill an old dns server and update the ns1 to a new ip. Seems it doesn't want to take despite what the world resolves the ip to. WHM simply doesn't want to display the correct IP in that field.

    When you stare at all this stuff you almost have to be OCD to make sure everything is right. Then to see this odd ball knowing it isn't right just raises the hair on the back of my neck.

    Now I did as the the thread explained and manually edited the yaml file. Then ran # /usr/local/cpanel/scripts/updatenameserverips which just simply reverted my manual edit to it's prior state.
     
  20. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    Since the script isn't working and we cannot be certain at this point if the nameservers are setup properly without more details, please submit a ticket using WHM > Support Center > Contact cPanel or using the link in my signature. If possible, please post the ticket number here afterward for tracking purposes.
     
Thread Status:
Not open for further replies.

Share This Page