FAQ

How to change the primary IP address of a WHM/cPanel Server

Artikel suchen

How to change the primary IP address of a WHM/cPanel Server

124796 Views

This is for CentOS/RHEL based servers. Steps in WHM: Log into WHM and go to Basic cPanel & WHM Setup Change the Primary IP here with the option that says \"The IP address (only one address) that will be used for setting…

How to change the primary IP address of a WHM/cPanel Server

Letzte Aktualisierung: April 2026
Lesezeit: ca. 2 Min.
Zielgruppe: Boxis-Kunden und Administratoren.


Was Sie erreichen

  • Sie führen die beschriebene Konfiguration oder Aufgabe für Ihren Boxis-Dienst aus.

Voraussetzungen

  • Zugriff auf die beschriebene Oberfläche, das Gerät oder den Server.
  • Informationen oder Zugangsdaten von Boxis (Vertrag, Willkommens-E-Mail oder Kundenbereich).

Hinweis Boxis: Angebote und Ansichten können abweichen. Bei Unklarheiten Ticket mit Service-Referenz öffnen.

This is for CentOS/RHEL based servers.

Steps in WHM:

  • Log into WHM and go to Basic cPanel & WHM Setup
  • Change the Primary IP here with the option that says "The IP address (only one address) that will be used for setting up shared IP virtual hosts"
  • Note: This might not actually be necessary.

Log in to SSH, and do the following:

  1. Edit /etc/sysconfig/network-scripts/ifcfg-eth0
  • Change the IPADDR and GATEWAY lines to match the new IP and Gateway for the new ip

Edit /etc/sysconfig/network

  • Change the GATEWAY line here if it does not exist in the ifcfg-* file.

Edit /etc/ips

  • Remove the new primary IP from this file if it is present
  • Add the old primary IP to this file with the format ::

Edit /var/cpanel/mainip

  • Replace the old primary IP with the new primary IP

Edit /etc/hosts

  • Replace the old primary IP with the new one if needed. The hostname's dns will need to be updated too

Restart the network service to make the new IP the primary****

  • service network restart
  • Note: You're probably going to be disconnected at this point, and have to log in to ssh using the new primary ip.

Restart the ipaliases script to bring up the additional IPs****

  • service ipaliases restart

Run ifconfig and make sure all IPs show up correctly Update the cpanel license to the new primary IP Verify you can still log in to WHM and there is no license warning

 

Erwartetes Ergebnis

  • Der Dienst verhält sich wie in den Schritten beschrieben.

Bei Problemen

  • Schritt wiederholen, Tippfehler prüfen (Hostnamen, Passwörter, Ports).
  • Fehlermeldung oder Screenshot notieren.

Ticket im Kundenbereich mit Dienstname, Uhrzeit und ggf. Traceroute bei Netzwerkthemen.

Siehe auch

  • Weitere Artikel derselben Kategorie in der Boxis-Wissensdatenbank.
  • /knowledgebase/ — Startseite der Wissensdatenbank.
Was this article helpful?
Views: 124796