CPanel: adding a range of IPs using WHM

This is just a short note showing how you can add a range of IPs in Cpanel/WHM accompanying my previous post “Linux Tips: How to quickly bind a range of IPs on RedHat based systems".
This can be easily done using the WHM interface: go to » IP Functions/Add a New IP » Address. Here you can choose the “Ip(s) to add” and the Subnet Mask. To add the same IPs shown in the previous post you will just have to enter:
Ip(s) to add:
Subnet Mask:

and click on “Do it". This will add all the IPs in the range to the system.

In the background CPanel will add for each IP a line in the file /etc/ips:


The IPs are then configured using the CPanel startup script called ipaliases (/etc/init.d/ipaliases). So keep in mind that you have to leave this to automatically start at system boot if you want your IPs managed by CPanel to be automatically configured at system start (and normally you will want that). This script is enabled by default, but I just wanted to explain its use so you will not turn it off by mistake.

comments powered by Disqus