Correctly configure WHM in Google Cloud Platform CentOS 7?

Mystagogue

Registered
Feb 15, 2020
3
0
1
USA
cPanel Access Level
Website Owner
Hello cPanelLauren I always do enjoy your replies and solutions, thorough and aiming for a solution.

Regarding WHM and Google Cloud Platform GCP, and CentOS 7 VM, it is absolutely not a straightforward install; documentations and instructions are lacking generally speaking on the internet and cPanel site or documentation sans any that is valuabe; and no true pre exposition to the evironment of WHM on Google Cloud VM.

Here what I ran into, after two weeks, almost full time days, trying to have WHM functioning like a paid VPS with a paid hosting company:

- VM Hostname must be input in VM setup before creating/deploying CentOS VM; otherwise, on a reboot, VM hostname will revert to a default that you had not assigned; and there is no way to make any hostname changes permanent.

- cPanel does not support NetworkManager, you have toDisable NetworkManager before running cPanel installation:

systemctl stop NetworkManager.service
systemctl disable NetworkManager.service
systemctl enable network.service
systemctl start network.service

- WHM / cPanel will install on a server that resides on a NAT-configured network:
Here, you will run into an issue with Google Cloud Platform when trying to create or reserve an additional 'Static internal IP Address'. Otherwise, you cannot add an External IP Address to WHM (thus to be assigned to an account/domain, cPanel, unless if I do create an additional static internal IP Address; then route or forward or bind (what ever is the right term for so) the Internal IP Address to External IP Address.

- There is no easy way at all to reserve an Additional Internal Static IP Address with Google Cloud VM Compute. That is, not the process itself is very complicated to achieve so, there is no site that would instruct on how to do so, but refering to Google Cloud documentation (not easy read for non engineers).

Do you think, cPanelLauren, that within a short time, a cPaenl.net can issue a practical instructions on how to setup and configure WHM on Google Cloud Platform VM; or assist with the steps I did mention above?

Thanx
 

Mystagogue

Registered
Feb 15, 2020
3
0
1
USA
cPanel Access Level
Website Owner
Hello cPanelLauren, the answer I did get from cPanel support regarding Nat Mapping:

- "The build_cpnat function does not create the NAT itself, it only detects and notes that there is a NAT. NAT configurations can not be done from the server, they will need to be done at the network level and then the build_cpnat function will need to be run after that to associate the NAT'd internal and external IPs with each other on the server. Can you confirm if xx.xxx.xx.101 [Putlic IP Address] has already had a NAT configured for it on the network?"

- "The configuration of the NAT can not be done inside of WHM. Once it has been done though, you should run the build_cpnat again so that WHM can be aware that there is another NAT'd IP on the server"

That is when I did try this:

- WHM > IP Functions > Add a New IP Address, and then added 3 Internal IP Addresses (subnet: 255.255.255.0)
- WHM > IP Functions > Show or Delete Current IP Addresses

Then I run:
# /usr/local/cpanel/scripts/build_cpnat

[email protected] userxxxx]# /usr/local/cpanel/scripts/build_cpnat
info [build_cpnat] 10.138.0.2 => xx.xxx.xx.58
warn [build_cpnat] Unable to map 192.168.4.1
warn [build_cpnat] Unable to map 10.138.0.3
warn [build_cpnat] Unable to map 192.168.4.2
[[email protected] userxxxx]#

How to go about configuring the 'Network side' on a Google Cloud Platform CentOS 7 VM to have the cPanel Nat function according to the instructions 1:1 NAT ?



Thanx,
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
Hi @Mystagogue


Regarding WHM and Google Cloud Platform GCP, and CentOS 7 VM, it is absolutely not a straightforward install; documentations and instructions are lacking generally speaking on the internet and cPanel site or documentation sans any that is valuabe; and no true pre exposition to the evironment of WHM on Google Cloud VM.
I agree its not a straightforward process. We do have that blog post mentioned above as well as the documentation in our knowledge base here: How to Install cPanel on Google Compute Engine Through The Google Marketplace | cPanel & WHM Documentation

- cPanel does not support NetworkManager, you have toDisable NetworkManager before running cPanel installation:
The instructions above are based on the cPanel Marketplace image which is an image that is geared for cPanel specifically so things like Network Manager which is definitely not something we support would already be disabled. - The need for Network Manager to be disabled is noted in our installation-guide networking requirements as well: System Requirements | cPanel & WHM Documentation

- WHM / cPanel will install on a server that resides on a NAT-configured network:
Here, you will run into an issue with Google Cloud Platform when trying to create or reserve an additional 'Static internal IP Address'. Otherwise, you cannot add an External IP Address to WHM (thus to be assigned to an account/domain, cPanel, unless if I do create an additional static internal IP Address; then route or forward or bind (what ever is the right term for so) the Internal IP Address to External IP Address.
I believe we address this concern in the document as well here:

https://docs.cpanel.net/knowledge-base/web-services/how-to-install-cpanel-on-google-compute-engine-through-the-google-marketplace/#configure-a-static-ip-address said:
Configure a static IP address.
By default, Google assigns ephemeral IP addresses to VM instances. They will remain assigned to the server as long as the VM is active, but will change if you turn off and then turn back on a VM.

To configure a static IP address for the server, perform the following steps:

  1. Under Assign a static external IP address to your VM instance, click Learn more. A help interface will appear.
  2. Click Go to the External IP addresses page.
  3. Click the arrow next to Emphemeral.
  4. Select Static. A new window will appear.
  5. In the Name text box, enter a name for the IP address.
  6. Click Reserve.

Do you think, cPanelLauren, that within a short time, a cPaenl.net can issue a practical instructions on how to setup and configure WHM on Google Cloud Platform VM; or assist with the steps I did mention above?
Can you let me know if there are any questions you have or issues with configuring the instance you still see after reading the documentation I provided?