How To change NameServer Ip ?

Status
Not open for further replies.

prandah

Registered
Jun 5, 2011
4
0
51
helo i have problem :(

when i check to intodnscom i have some error

Looks like the A records (the GLUE) got from the parent zone check are different than the ones got from your nameservers. You have to make sure your parent server has the same NS records for your zone as you do.I detected some problems as follows:
For ns1.domain.com the parent reported: ['199.71.213.169'] and your nameservers reported: ['199.71.213.169']
For ns2.domain.com the parent reported: ['199.71.213.169'] and your nameservers reported: ['199.71.213.169']
on my domain registrar i set it to this

ns1.domain.com. ['216.24.204.236'] [TTL=172800]
ns2.domain.com. ['199.71.213.169'] [TTL=172800]
so i check nameserver on whm

ns1.domain.com 199.71.213.169
ns2.domain.com 199.71.213.169
my question how to change ip

ns1.domain.com to 216.24.204.236
 

fi77i

Well-Known Member
Aug 20, 2008
57
0
56
Uruguay
cPanel Access Level
Root Administrator
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.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
/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.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
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
 

dyrer

Active Member
Jun 3, 2005
42
0
156
cPanel Access Level
Website Owner
After this Nameserver IP's are empty

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
 

cPanelTracey

Member
Staff member
Mar 5, 2010
14
0
126
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.
 

whmcpuser

Member
Apr 9, 2012
10
1
53
cPanel Access Level
Website Owner
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"
 

lbeachmike

Well-Known Member
Dec 27, 2001
306
1
316
Long Beach, NY
cPanel Access Level
Root Administrator
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.
 

justauser

Registered
Sep 14, 2012
3
0
1
cPanel Access Level
Root Administrator
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.
 

justauser

Registered
Sep 14, 2012
3
0
1
cPanel Access Level
Root Administrator
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.
 

justauser

Registered
Sep 14, 2012
3
0
1
cPanel Access Level
Root Administrator
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.
 

cPanelTracey

Member
Staff member
Mar 5, 2010
14
0
126
Houston, TX
So is there a solution here or not? This method doesn't seem to work >>> /usr/local/cpanel/scripts/updatenameserverips
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.
 

egillette

Well-Known Member
Jan 5, 2010
68
0
56
Orlando, FL
cPanel Access Level
DataCenter Provider
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.
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! :)
 

r3chn3r

Registered
Oct 4, 2012
1
0
1
cPanel Access Level
Root Administrator
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.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
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.
 
Status
Not open for further replies.