Changing the Public IP in a NAT setup

Changing the Public IP in a NAT setup
5 (100%) 1 vote

If your server is using a NAT setup and for some reason isn’t properly showing the correct public IP that should be mapped to the private IP on your server, you can easily fix this by creating a script to tell cPanel what the public IP should be.  For example, you can simple put the IP address in plaintext in a file in the main document root of your server (usually /usr/local/apache/htdocs) or your website, then call it from /etc/cpsources.conf:

MYIP=http://locationofscript

When cPanel calls this script, the output of the script will be used to source the MYIP variable.

On a side note, if cPanel is not pulling your public IP properly, this could be an issue with your outbound routing between your server and router/firewall. Not having your server access the internet on the IP it was intended to respond to publicly could result in licensing issues with cPanel as well.

 

Don't be selfish, share!Tweet about this on TwitterShare on RedditShare on TumblrBuffer this pageDigg thisShare on FacebookFlattr the authorEmail this to someoneShare on Google+Pin on PinterestPrint this pageShare on LinkedInShare on StumbleUpon

Leave a Reply

Your email address will not be published. Required fields are marked *

Log in