Anyway to make CPANEL more friend streamlined when behind a NAT config?

OS: RHE 3 + Cpanel latest version.

Hello,

I have a issue that i've been trying to find a solution for, but no one seems to have an answer... well not an answer that can help me lol Anyway to make CPANEL more friend streamlined when behind a NAT config?.

Basically I have a RHE server with cpanel on it, which is behind a hardware firewall using a NAT configuration. This configuration makes me have two sets of IP's, public and private. Before i go on, just let me say i have cpanel working behind this configuration with no issues... but it causes some dns related fuctionality to become unusable.

---basic info on the situation:

At the current moment, whenever a new account is created through cpanel... its dns entry for the A record is created with the private IP. After the account is created, I go into WHM and adjust the A record to reflect the public IP....which then causes the website to be viewable through the web.

Keep in mind that although WHM displays the public IP in its DNS records... the private IP is listed in the apache config instead of the public IP.

Now although this seems to work perfectly, and I dont mind changing the IP in WHM for newly created accounts.. it causes problems in the long run.

-- The problem i'm trying to find a solution for:

Because WHM lists the public IP for the domain, everytime a user trys to create a new add-on/parked/subdomain, it causes them to be created with the Public IP within the Apache config..making them unviewable from the web. I fix this by going into the apache config and changing all references to the public IP back to the Private IP..and making sure that WHM still lists the public IP's in the dns records.

The problem this causes is whenever a user creates a add-on/parked/subdomain , they have to contact me so i can make the necessary changes to the ip reference in the apache config. I make all users aware of this problem, and let them know that they need to contact me.. but some forget and think it's something wrong they are doing... which causes more confusion in the longrun.

I'm trying to find a way for one of the following:

1. Have WHM create the add-on/parked/subdomain record in Apache config with the private IP, and list the public IP in the WHM dns config.

or

2. Have a email sent out to me whenever a user creates a add-on/parked/subdomain, so i may change the IP references, without them having to contact me every time.

or

3. Create a script that runs on a cron or something that will go through the apache config and change references from the public IP back to the private IP.(I would like to try and avoid this route, as i dont want somthing to corrupt the config, or change the wrong info and bring down the server)

or

4. A better solution one of you may know of, that i havent thought of Anyway to make CPANEL more friend streamlined when behind a NAT config?


I know this might be an unsual and not common situation, but i'm hoping that one of your gurus out there can help me with this isssue. Thank you in advance for all comments, replies, etc Anyway to make CPANEL more friend streamlined when behind a NAT config?

 

 

 

 

Top