Skip to content

Private IP show on server rather public IP

0

I have an instance to host cPanel. Until about two months ago, everything was fine, and the server had the public IP shown. I did not change anything in the settings, but now cPanel only sees the private IP rather than the public IP. I checked all settings in the Network and the Elastic IP addresses settings. All looks correct, I confirmed this with cPanel support.

Need help to sort this out to get the public IP back to the server.

Thanks

3 Answers
0

The issue you're experiencing with your cPanel server only seeing the private IP instead of the public IP is not uncommon and can occur due to various reasons, even without changing settings. Here are some potential causes and solutions to consider:

  1. EC2 Instance Configuration: Ensure that your EC2 instance is configured to have a public IP address. Check the instance details in the AWS Console to confirm that a public IP is assigned.

  2. Elastic IP Association: If you're using an Elastic IP, verify that it's correctly associated with your EC2 instance. Sometimes, the association can become disassociated unexpectedly.

  3. Security Group and Network ACL Settings: Review your security group and network ACL configurations to ensure they allow inbound traffic on the necessary ports for cPanel (typically 2083 for cPanel and 2087 for WHM).

  4. VPC and Subnet Configuration: Confirm that your instance is in a public subnet with a route to an Internet Gateway.

  5. cPanel Configuration: Sometimes, cPanel's configuration files may need to be updated to recognize the public IP. You might need to manually update the IP address in cPanel's configuration files.

  6. Network Interface: Check if there have been any changes to the network interface of your EC2 instance. Ensure the public IP is associated with the correct network interface.

  7. AWS Infrastructure Changes: Occasionally, AWS may make infrastructure changes that could affect IP addressing. Ensure your instance and VPC settings are up to date.

  8. Reboot the Instance: As a last resort, try rebooting your EC2 instance. This can sometimes resolve IP-related issues.

If none of these solutions work, you may need to contact AWS support for further assistance, as there could be an underlying issue with the EC2 instance or VPC configuration that's not immediately apparent.

Remember, when dealing with IP address changes, it's generally recommended to use Elastic IPs for services that require a static public IP address, as they remain associated with your AWS account until you choose to release them.

Sources
webpage not accessible via Elastic IP on EC2 | AWS re:Post
Issue with automatic public IP adress (Bug report) | AWS re:Post

answered a year ago
AWS
EXPERT
reviewed a year ago
0

All checked still not sorted

answered a year ago
0

Make sure that you are using an EIP. If not, your public IP will change when stopping/starting the instance. Keep in mind that the public IP will never be configured on your host (i.e. on the network interfaces), rather the traffic to the public IP is NAT'ed to your hosts private IP in the AWS network so you will likely need to configure cPanel with public IP in a config file.

AWS
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.