Skip to main content
cPanel Technical Support has been heavily impacted by hurricane Beryl and our ability to respond to tickets has been hindered as a result. We appreciate your understanding and patience as we address these delays.

Changing the main IP after adding an IP

Comments

5 comments

  • ffeingol

    You basically can't do what you did.  When you add an IP through WHN it's adding it on as an additional IP to that NIC.  You would still need the "main" IP to be there and function.

    If you are trying to change the main IP of the server you'd need to:

    • Change the IP as the OS level (how you do that depends on your OS)
    • Change the IP that the cPanel license is tied to
    • Reboot the server (so the new IP takes effect)
    • Log in to WHM and go through the IP Migration Wizard (which will change all references of the old IP to the  new IP)
    1
  • Andrew
    Translate
    • Have you rebooted the server after you added the new IP?
    • If you check "Show or Delete Current IP Addresses" in WHM the new IP you added is the one without "Delete" option?
    • By any chance have you used the "IP Migration Wizard" as well?

    Andrew N. - cPanel Plesk VMWare Certified Professional
    Do you need immediate assistance? 20 minutes response time!*
    EmergencySupport - Professional Server Management and One-time Services

    0
  • Unnamed User

    No i have not reboot the server.

    i  Can't login to WHM now.

    i did not use "IP Migration Wizard".

     

    I tried to change the main IP by changing it in some files. I edit /var/cpanel/mainip , /etc/ips, /etc/hosts

    and restart the network. Now I don't even have PING.

    I used rescue mode to revert the change but I still don't have ping.

    0
  • Andrew

    It was a bad idea to manually edit files :( I believe the best would be to hire a professional who can have a closer look at your server and see what is going on. You can find cPanel certified Professionals here.

    Andrew N. - cPanel Plesk VMWare Certified Professional
    Do you need immediate assistance? 20 minutes response time!*
    EmergencySupport - Professional Server Management and One-time Services

    0
  • TechAmigo

    Verify that your network service is operational and confirm that the IP address is displayed in the Ethernet services by utilizing the 'ifconfig' command.

    sudo systemctl status network

    0

Please sign in to leave a comment.