Assign Multiple IP Addresses on One Account
Posted by Vanessa | Tagged under networking,tricks | Posted on May 14, 2010
7
By default, cPanel supports the usage of one dedicated IP per account. However, you can get around this by editing just a few files on the server. Here are the steps:
1. Edit /var/cpanel/userdata/$USER/$SUBDOMAIN.$DOMAIN for each subdomain (for addon/parked domains you’ll usually edit the file for the subdomain associated with the addon/parked domain) and change the ip value to a ‘dedicated’ ip.
2. Run /scripts/rebuildhttpdconf
3. Edit the dns zone for the subdomain (which will likely be attached to the parent domain) and update the a-record to point to that IP as well. Then syncronize the zone out to the DNS cluster, if one exists:
/scripts/dnscluster synczone <parentdomain>
4. Edit /etc/domainips and add an entry for that sudomain to point to the IP and run /scripts/rebuildippool to make sure the IP is marked as taken.
Related posts:





sending...

Hey, Thanks for the post. I can’t seem to get the last step to work. I have added the entry for the domain and ip address but it dosn’t show the address as taken. Any Suggestions?
Did you rebuild httpd.conf? Try also /scripts/rebuildippool to update the ip pool
I did this and cPanel shows the addresses are being used, but when I ping the web address, it still comes back to the original IP.
This depends on if you got shared or vps hosting? Cause i have shared hosting and i’ve studying how to have mupltiple ip on one cpanel.
Thanks for reply
I ran into the issue of it saying:
/scripts/rebuildhttpconf
Wasn’t a file.
After a little research, I saw other places saying to do “httpd” not “http”:
/scripts/rebuildhttpdconf
And it worked.
Just as a heads up, there is a typo. Script:
/scripts/rebuildhttpconf
should be:
/scripts/rebuildhttpdconf
(notice the D in httpDconf)
Fixed – thanks for pointing it out