Assigning an additional IP address using whmapi1 / SSH Commands

Sometimes it’s faster for serevr administrator to manage your server through SSH instead of logging into WHM and using the graphical interface.

You can use the whmapi1 command-line tool to complete WHM tasks using SSH faster and quicker.

Please use the following whmapi1 command-line to add IP address :

For example we need to add IP with details :
IP : 111.222.33.44
Subnetmask 255.255.254.0

Please login to your serevr using SSH

# ssh root@serevr.ip.address -p 22

Use following whmapi1command to add IP address (111.222.33.44)

# whmapi1 addips ips=111.222.33.44 netmask=255.255.254.0

Once IP address has been added to server, make sure that its responding and you are able to ping it.

# ping 111.222.33.44

Assign newly added IP address to cPanel account as dedicated IP.

For example assign dedicated IP to cpuser
IP : 111.222.33.44
cPanel username : cpuser

whmapi1 setsiteip ip=111.222.33.44 user=cpuser

To verify if IP (111.222.33.44) address is assigned to user (cpuser)

whmapi1 get_shared_ip user=cpuser

To remove IP using whmapi1

# whmapi1 delip ip=111.222.33.44