Using more than one shared IP in cPanel/CentOS?

Hello,
Is there any reason not to 'hack' cPanel to allow the use of more than one shared IP address?

It would really make my life a thousand percent easier if i could set up 2 or 3 of my IP addresses as shared IPs so i could group clients' sites on the same IPs...

Also, does anyone know the precise process to turn a dedicated IP into a shared one?
i found this page, but it seems you can set an IP as 'reserved' right from WHM in 'Show/Edit Reserved IPs', and does reserving an IP automatically make it a shared one?

Any help would be greatly appreciated..
Be Well
 

WBW

Member
One way would be to create reseller accounts and use WHM to set each one to use a default shared IP. You'd then set up or assign accounts to one or the other reseller, giving them the shared IP associated with that reseller.
 

KH-Jonathan

Director of Managed Services
Staff member
The reseller method mentioned about is the only supported method of accomplishing this.

Reserving an IP will prevent cPanel/WHM from using it at all.

To change a site's IP in WHM you can use the "Change Site's IP Wizard". The wording of that may have a changed a little but you should be able to find it.
 
Beautiful!!
Thank you so much you two!!!
Just fyi, here's what i did:
- i created a 'blank' reseller account using the process outlined on this official doc page
- Removed any creation privileges for that account -- could i remove all privileges??
- Assigned a free IP to that account in 'Resellers' --> 'Manage Resellers Shared IPs' in WHM
- went to the 'Account Functions' --> 'Change Sites IP address' in WHM and proceeded to share an IP for several related accounts

That was exactly what i was hoping for!
Thank you again!
Peter
 

Yagami

Member
In my VPS cpanel, My primary IP is currently a shared IP, with 3 associated domains (3 cpanel accounts) in it. My secondary IP is the dedicated IP and currently only has 1 associated domain (1 cpanel account). Before, I wanted the primary IP to be a dedicated one and the secondary IP as shared. But I was not able to do it since the default setting is the reverse.

So now all my IPs are currently in use and I can only add additional domains to my primary IP. I want to transfer some of the domains in the primary IP to the secondary IP, but it is currently dedicated. Will the reseller trick mentioned above work for me to make my secondary IP as shared? In other words, none of my IPs will become dedicated any more? And will this reseller trick cause downtime?
 
@Yagami:
It would absolutely work..
All you need to do is free up whatever IP you want to turn into a shared IP by using the 'Account Functions' --> 'Change Sites IP address' in WHM to temporarily assign the domain that is using it to the main shared IP, convert the dedicated IP using above process, move the site back to that IP, and move any other site you want to that IP too...
No downtime, though you do need to pay attention to your DNS entries once you've moved the domains to your new 'shared' IP, like spf TXT entries, if you have authorized the previous IP address..
That's basically what i did..
 

Yagami

Member
I would like to report that I've tried today this reseller trick to make the secondary IP a shared one and it worked.

But I have a concern.
The cpanel official doc page sample says to use echo "username:all" >> /var/cpanel/resellers

I didn't give it all priveleges so I used echo "username" >> /var/cpanel/resellers

However, when I'm going to assign the free IP to the reseller, I'm getting an error " Failed to set shared (IP-less) IP Specified user is not a reseller." So I have no choice but to give it all privileges (ROOT ACCESS) since I don't know what privileges it needs.

I don't like it to grant root access as it may make my VPS server vulnerable. What kind of privileges should I turn on just for the purpose of making the secondary IP shared and host some of my sites from the primary IP?
 
Top