cPanel & WHM Version 94 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

cPanel Hosts should automatically figure out private and public IPs on cloud environments

teodesian shared this idea 4 years ago
Completed

cPanel and WHM has been being deployed succesfully on Cloud environments like AWS where it has a 1:1 NAT configuration for quite some time, however it is not without "some assembly required" after you've got a spawnable image template saved.


As of now, there are two files that must be modified manually or via other script the user supplies (cloud config on AWS) to 'fix' invalid configurations on templates you've saved for valid cPanel installations.

  • /var/cpanel/mainip
  • /var/cpanel/cpnat

This is due to these files having the saved configuration for the machine you made the template with. Any subsequently created cPanel accounts, of course, will then have invalid shared IP records.


Now, in any configuration where the license check works, your NAT Public IP should correspond to the IP cPanel has on record as the licensed IP. As such, when one runs /scripts/mainipcheck, you'll see a warning about an 'invalid configuration' even though it correctly detected your NAT IP and the Private IP bound to the networking device.


It would be nice if:

  1. This script actually offered to fix this for you to save time.
  2. Some tweak setting like 'Automatically check and fix NAT & Main IP configuration issues on boot' existed that you could just set on the cPanel host you intend to turn into a template for your cloud environment then have it automatically fix this for you on boot (optionally? notifying the server admin about this).

Best Answer
photo

This has been completed as part of a post-install on new VMs built using our images, available here: http://httpupdate.cpanel.net/cpanelsync/images/

Comments (2)

photo
1

This is currently in-progress and being worked on by our team! We're hoping to see this publicly before the end of the year.

photo
1

This has been completed as part of a post-install on new VMs built using our images, available here: http://httpupdate.cpanel.net/cpanelsync/images/

Replies have been locked on this page!