A common issue on cPanel servers is that secondary (add-on) IP addresses disappear after a server reboot. This usually happens because cPanel uses its own service (`ipaliases`) to manage IPs, which can conflict with manual OS configurations.
Always add new IP addresses via WHM using the "Add a New IP Address" tool.
If you manually add IPs to the Linux network scripts (e.g., via Netplan or
/etc/sysconfig/network-scripts/), cPanel may overwrite or ignore them during startup.
Step 1: Ensure the ipaliases service is enabled
cPanel relies on the ipaliases service to bring up secondary IPs during boot. If this service is disabled, only your main IP will work after a reboot.
Run the following commands via SSH as root to enable and start the service:
# Enable the service to start at boot
systemctl enable ipaliases
# Start/Restart the service immediately
/usr/local/cpanel/scripts/restartsrv_ipaliases
Step 2: Verify the Main IP Configuration
The alias system relies on knowing exactly which IP is the "Main" IP. If this file is empty or incorrect, the aliases won't bind.
1. Check the content of the main IP file:
cat /var/cpanel/mainip
2. Does it show your primary VPS IP?
- Yes: Proceed to step 3.
- No / Empty: Edit the file and add only your primary IP address (one line, no spaces).
Step 3: Rebuild the IP Pool
If the configuration seems corrupt, you can force cPanel to rebuild the IP mapping.
# Rebuild the IP pool
/scripts/rebuildippool
# Restart the alias service again
/scripts/restartsrv_ipaliases
Check if your IPs are back online using ip addr or by pinging them externally.