Tuesday, 16 November 2010

Delete an IP address from linux cPanel dedicated server

Normally, to delete an IP from a cPanel server you can login to WHM and remove the IP using the function “Show or delete current IP address” under “IP functions” or use linux command.

For some reason we were having problems with the datacenter and we were asked to remove the IP using KVM. In this case, we entered the KVM and checked the if the IP was listed on the server by using ifconfig – we found that the IP was listed there. To remove the IP edit the file.
root@server# nano /etc/ips

and now remove the line of the IP and then restart the ipaliases service by the command
root@server# service ipaliases restart

It will show failed, you can ignore those warnings. And you can recheck if the IP has gone by using the command ifconfig. You’ll see the IP is not seen in the ifconfig output. Now, you can ask the datacenter to get the server online and then if you check from the WHM you will see that the IP is not available there.

That’s it!

No comments:

Post a Comment