If you are using a VPS and you have cPanel installed on it, then you may need to update or change WHM Nameserver IPs for various reasons. If you simply try to change it, you will find that they are not changing accurately. For this, you have to do it manually I mean you may do it by command.

Login to your server via SSH, you need to log in as root. Now enter this command:

You will see something just like below:

xxx.xxx.xx.xxx=ns1.domain.com
xxx.xxx.xx.xxx=ns2.domain.com

Now press ‘A’ button on your keyboard and replace those IPs with your new Ips. Then write the below command and press enter:

Now again enter a command:

You will see something just like as before. You have to replace existing Ips with new Ips. After saving, you have restart your “named” and “cpanel” service. Enter these commands one by one:

Now go to** Main >>> Server Configuration >>> Basic cPanel & Configuration >>> Basic cPanel & WHM Setup**. Look at the bottom, click on “Assigned IP Address” for each Nameserver. Please don’t forget to add “A” record for Nameservers. At last, permanently you will got your Nameserver IPs changed successfully. Let me know if you face any problem.